13
13
import org .mockito .Mock ;
14
14
import org .mockito .junit .jupiter .MockitoExtension ;
15
15
import org .springframework .mock .web .MockMultipartFile ;
16
- import org .springframework .security .crypto .password .PasswordEncoder ;
17
16
import org .springframework .test .context .event .annotation .BeforeTestMethod ;
18
17
import org .springframework .web .multipart .MultipartFile ;
19
18
25
24
import com .ajou .hertz .domain .user .entity .User ;
26
25
import com .ajou .hertz .domain .user .entity .UserProfileImage ;
27
26
import com .ajou .hertz .domain .user .repository .UserProfileImageRepository ;
28
- import com .ajou .hertz .domain .user .repository .UserRepository ;
29
27
import com .ajou .hertz .domain .user .service .UserProfileImageCommandService ;
30
- import com .ajou .hertz .domain .user .service .UserQueryService ;
31
28
import com .ajou .hertz .util .ReflectionUtils ;
32
29
33
30
@ DisplayName ("[Unit] Service(Command) - User Profile Image" )
@@ -36,18 +33,9 @@ public class UserProfileImageCommandServiceTest {
36
33
@ InjectMocks
37
34
private UserProfileImageCommandService sut ;
38
35
39
- @ Mock
40
- private UserQueryService userQueryService ;
41
-
42
- @ Mock
43
- private UserRepository userRepository ;
44
-
45
36
@ Mock
46
37
private UserProfileImageRepository userProfileImageRepository ;
47
38
48
- @ Mock
49
- private PasswordEncoder passwordEncoder ;
50
-
51
39
@ Mock
52
40
private HertzProperties hertzProperties ;
53
41
@@ -120,9 +108,6 @@ public void setUp() {
120
108
}
121
109
122
110
private void verifyEveryMocksShouldHaveNoMoreInteractions () {
123
- then (userQueryService ).shouldHaveNoMoreInteractions ();
124
- then (userRepository ).shouldHaveNoMoreInteractions ();
125
- then (passwordEncoder ).shouldHaveNoMoreInteractions ();
126
111
then (fileService ).shouldHaveNoMoreInteractions ();
127
112
}
128
113
0 commit comments