Search in sources :

Example 1 with ProviderTypeStatus

use of org.guvnor.ala.ui.model.ProviderTypeStatus in project kie-wb-common by kiegroup.

the class EnableProviderTypePagePresenterTest method testSetup.

@Test
public void testSetup() {
    presenter.setup(providerTypeStatus);
    verify(view, times(1)).clear();
    assertEquals(providerTypeStatus.size(), presenter.getItemPresenters().size());
    for (int i = 0; i < presenter.getItemPresenters().size(); i++) {
        ProviderTypeItemPresenter itemPresenter = presenter.getItemPresenters().get(i);
        Pair<ProviderType, ProviderTypeStatus> pair = providerTypeStatus.get(i);
        verify(itemPresenter, times(1)).setup(pair.getK1(), pair.getK2());
        verify(itemPresenter, times(1)).addContentChangeHandler(any(ContentChangeHandler.class));
        verify(view, times(1)).addProviderType(itemPresenter.getView());
    }
    verify(providerTypeItemPresenterInstance, times(providerTypeStatus.size())).get();
}
Also used : ProviderTypeItemPresenter(org.guvnor.ala.ui.client.wizard.providertype.item.ProviderTypeItemPresenter) ProviderTypeStatus(org.guvnor.ala.ui.model.ProviderTypeStatus) ContentChangeHandler(org.guvnor.ala.ui.client.util.ContentChangeHandler) ProviderType(org.guvnor.ala.ui.model.ProviderType) Test(org.junit.Test)

Aggregations

ContentChangeHandler (org.guvnor.ala.ui.client.util.ContentChangeHandler)1 ProviderTypeItemPresenter (org.guvnor.ala.ui.client.wizard.providertype.item.ProviderTypeItemPresenter)1 ProviderType (org.guvnor.ala.ui.model.ProviderType)1 ProviderTypeStatus (org.guvnor.ala.ui.model.ProviderTypeStatus)1 Test (org.junit.Test)1