File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/test/java/guru/springframework/sfgpetclinic/services/springdatajpa Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,13 @@ class SpecialitySDJpaServiceTest {
2323 @ InjectMocks
2424 SpecialitySDJpaService service ;
2525
26+ @ Test
27+ void testDeleteByObject (){
28+ Speciality speciality = new Speciality ();
29+ service .delete (speciality );
30+ verify (specialtyRepository ).delete (any (Speciality .class ));
31+ }
32+
2633 @ Test
2734 void findByIdTest (){
2835 Speciality speciality = new Speciality ();
@@ -34,6 +41,7 @@ void findByIdTest(){
3441 assertThat (foundSpeciality ).isNotNull ();
3542
3643 verify (specialtyRepository ).findById (1L );
44+ verify (specialtyRepository ).findById (anyLong ());
3745
3846 System .out .println ("speciality = " + speciality );
3947 System .out .println ("foundSpeciality = " + foundSpeciality );
You can’t perform that action at this time.
0 commit comments