File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/test/java/guru/springframework/sfgpetclinic/services/springdatajpa Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1313import static org .assertj .core .api .Assertions .assertThat ;
1414import static org .junit .jupiter .api .Assertions .*;
1515import static org .mockito .BDDMockito .given ;
16+ import static org .mockito .BDDMockito .then ;
1617import static org .mockito .Mockito .*;
1718
1819@ ExtendWith (MockitoExtension .class )
@@ -56,7 +57,9 @@ void findByIdBddTest() {
5657
5758 Speciality foundSpeciality = service .findById (1L );
5859 assertThat (foundSpeciality ).isNotNull ();
59- verify (specialtyRepository ).findById (anyLong ());
60+ then (specialtyRepository ).should ().findById (anyLong ());
61+ // then(specialtyRepository).should(times(1)).findById(anyLong());
62+ then (specialtyRepository ).shouldHaveNoMoreInteractions ();
6063 }
6164
6265 @ Test
You can’t perform that action at this time.
0 commit comments