use of org.guvnor.structure.events.AfterEditOrganizationalUnitEvent in project kie-wb-common by kiegroup.
the class LibraryScreenTest method organizationalUnitEditedTest.
@Test
public void organizationalUnitEditedTest() {
final OrganizationalUnit organizationalUnit = mock(OrganizationalUnit.class);
final List<String> contributors = new ArrayList<>();
contributors.add("admin");
doReturn(contributors).when(organizationalUnit).getContributors();
libraryScreen.organizationalUnitEdited(new AfterEditOrganizationalUnitEvent(mock(OrganizationalUnit.class), organizationalUnit));
verify(view).setContributorsCount(contributors.size());
}
use of org.guvnor.structure.events.AfterEditOrganizationalUnitEvent in project kie-wb-common by kiegroup.
the class ContributorsListPresenterTest method organizationalUnitEditedTest.
@Test
public void organizationalUnitEditedTest() {
final OrganizationalUnit organizationalUnit = mock(OrganizationalUnit.class);
final AfterEditOrganizationalUnitEvent afterEditOrganizationalUnitEvent = mock(AfterEditOrganizationalUnitEvent.class);
doReturn(organizationalUnit).when(afterEditOrganizationalUnitEvent).getEditedOrganizationalUnit();
when(projectContext.getActiveOrganizationalUnit()).thenReturn(Optional.of(organizationalUnit));
presenter.organizationalUnitEdited(afterEditOrganizationalUnitEvent);
verify(view).clearFilterText();
verify(presenter).updateContributors(organizationalUnit);
}
Aggregations