use of org.uberfire.client.mvp.UpdatedLockStatusEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterTest method testOnUpdatedLockStatusEvent_NotLocked.
@Test
public void testOnUpdatedLockStatusEvent_NotLocked() {
final UpdatedLockStatusEvent event = mock(UpdatedLockStatusEvent.class);
when(event.getFile()).thenReturn(dtPath);
dtPresenter.onUpdatedLockStatusEvent(event);
verify(dtPresenter).refreshColumnsPage();
verify(dtPresenter).refreshMenus();
assertEquals(NOBODY, dtPresenter.getAccess().getLock());
}
use of org.uberfire.client.mvp.UpdatedLockStatusEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterTest method testOnUpdatedLockStatusEvent_LockedByOtherUser.
@Test
public void testOnUpdatedLockStatusEvent_LockedByOtherUser() {
final UpdatedLockStatusEvent event = mock(UpdatedLockStatusEvent.class);
when(event.getFile()).thenReturn(dtPath);
when(event.isLockedByCurrentUser()).thenReturn(false);
when(event.isLocked()).thenReturn(true);
dtPresenter.onUpdatedLockStatusEvent(event);
verify(dtPresenter).refreshColumnsPage();
verify(dtPresenter).refreshMenus();
assertEquals(OTHER_USER, dtPresenter.getAccess().getLock());
}
use of org.uberfire.client.mvp.UpdatedLockStatusEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterTest method testOnUpdatedLockStatusEvent_NullFile.
@Test
public void testOnUpdatedLockStatusEvent_NullFile() {
final UpdatedLockStatusEvent event = mock(UpdatedLockStatusEvent.class);
dtPresenter.onUpdatedLockStatusEvent(event);
}
Aggregations