jchuquen / academic-register-services

Accademic Register REST API for Grow Plan
0 stars 0 forks source link

Use the new BDD syntaxis for Mokito #22

Open jchuquen opened 3 months ago

jchuquen commented 3 months ago

//given Vendor vendor = getVendor1();

//mockito BDD syntax given(vendorRepository.findById(anyLong())).willReturn(Optional.of(vendor));

//when VendorDTO vendorDTO = vendorService.getVendorById(1L);

//then then(vendorRepository).should(times(1)).findById(anyLong());

//JUnit Assert that with matchers assertThat(vendorDTO.getName(), is(equalTo(NAME_1)));

jchuquen commented 3 months ago

Please take as base project spring5-mvc-rest in branch vendor-api