use of com.management.repositories.FanZoneRepository in project Internet-Software-Architectures by zivko11.
the class FanZoneControllerTests method DeletingFanZone_ReturnsOK.
@Test
public void DeletingFanZone_ReturnsOK() {
Mockery mock = new Mockery();
fanZoneRepository = mock.mock(FanZoneRepository.class);
// Expectations
mock.checking(new Expectations() {
{
oneOf(fanZoneRepository).delete(1);
}
});
FanZoneManager manager = new FanZoneManager(fanZoneRepository);
// Act and assert
FanZoneController controller = new FanZoneController(manager);
Assert.assertNotNull(controller);
Assert.assertEquals(controller.deleteFanZone(1), new ResponseEntity<FanZoneDTO>(HttpStatus.OK));
mock.assertIsSatisfied();
}
Aggregations