File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/test/java/guru/springframework/sfgpetclinic/services/springdatajpa Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ package guru .springframework .sfgpetclinic .services .springdatajpa ;
2+
3+ import guru .springframework .sfgpetclinic .repositories .VetRepository ;
4+ import org .junit .jupiter .api .Test ;
5+ import org .junit .jupiter .api .extension .ExtendWith ;
6+ import org .mockito .InjectMocks ;
7+ import org .mockito .Mock ;
8+ import org .mockito .junit .jupiter .MockitoExtension ;
9+
10+ import static org .junit .jupiter .api .Assertions .*;
11+ import static org .mockito .Mockito .times ;
12+ import static org .mockito .Mockito .verify ;
13+
14+ @ ExtendWith (MockitoExtension .class )
15+ class VetSDJpaServiceTest {
16+
17+ @ Mock
18+ VetRepository vetRepository ;
19+
20+ @ InjectMocks
21+ VetSDJpaService service ;
22+
23+ @ Test
24+ void deleteById () {
25+ service .deleteById (1L );
26+ verify (vetRepository , times (1 )).deleteById (1L );
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments