use of org.ff4j.audit.EventWorker in project ff4j by ff4j.
the class EventWorkerTest method testEventWorkerCall.
@Test
public void testEventWorkerCall() throws Exception {
// Given
EventRepository er = mock(EventRepository.class);
Event evt = new Event(SOURCE_JAVA, TARGET_FEATURE, "F1", ACTION_CHECK_OK);
when(er.saveEvent(evt)).thenReturn(false);
EventWorker ew = new EventWorker(evt, er);
// When
ew.call();
}
use of org.ff4j.audit.EventWorker in project ff4j by ff4j.
the class EventWorkerTest method testEventWorker.
@Test
public void testEventWorker() {
// Given
EventRepository er = new InMemoryEventRepository();
Event evt = new Event(SOURCE_JAVA, TARGET_FEATURE, "F1", ACTION_CHECK_OFF);
EventWorker ew = new EventWorker(evt, er);
// When
ew.setName("NAME1");
// Then
Assert.assertEquals("NAME1", ew.getName());
}
Aggregations