Search in sources :

Example 1 with ArchetypeTableConfiguration

use of org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration in project kie-wb-common by kiegroup.

the class AbstractArchetypeTablePresenterTest method isShowIncludeColumnWhenIsTrueTest.

@Test
public void isShowIncludeColumnWhenIsTrueTest() {
    final ArchetypeTableConfiguration config = new ArchetypeTableConfiguration.Builder().withIncludeColumn().build();
    doReturn(config).when(presenter).getConfiguration();
    final boolean result = presenter.isShowIncludeColumn();
    assertTrue(result);
}
Also used : ArchetypeTableConfiguration(org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration) Test(org.junit.Test)

Example 2 with ArchetypeTableConfiguration

use of org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration in project kie-wb-common by kiegroup.

the class AbstractArchetypeTablePresenterTest method isShowValidateActionWhenIsFalseTest.

@Test
public void isShowValidateActionWhenIsFalseTest() {
    final ArchetypeTableConfiguration config = new ArchetypeTableConfiguration.Builder().build();
    doReturn(config).when(presenter).getConfiguration();
    final boolean result = presenter.isShowValidateAction();
    assertFalse(result);
}
Also used : ArchetypeTableConfiguration(org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration) Test(org.junit.Test)

Example 3 with ArchetypeTableConfiguration

use of org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration in project kie-wb-common by kiegroup.

the class AbstractArchetypeTablePresenterTest method isShowDeleteActionWhenIsFalseTest.

@Test
public void isShowDeleteActionWhenIsFalseTest() {
    final ArchetypeTableConfiguration config = new ArchetypeTableConfiguration.Builder().build();
    doReturn(config).when(presenter).getConfiguration();
    final boolean result = presenter.isShowDeleteAction();
    assertFalse(result);
}
Also used : ArchetypeTableConfiguration(org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration) Test(org.junit.Test)

Example 4 with ArchetypeTableConfiguration

use of org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration in project kie-wb-common by kiegroup.

the class AbstractArchetypeTablePresenterTest method isShowValidateActionWhenIsTrueTest.

@Test
public void isShowValidateActionWhenIsTrueTest() {
    final ArchetypeTableConfiguration config = new ArchetypeTableConfiguration.Builder().withValidateAction().build();
    doReturn(config).when(presenter).getConfiguration();
    final boolean result = presenter.isShowValidateAction();
    assertTrue(result);
}
Also used : ArchetypeTableConfiguration(org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration) Test(org.junit.Test)

Example 5 with ArchetypeTableConfiguration

use of org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration in project kie-wb-common by kiegroup.

the class AbstractArchetypeTablePresenterTest method configureViewWhenEmptyTest.

@Test
public void configureViewWhenEmptyTest() {
    final ArchetypeTableConfiguration config = new ArchetypeTableConfiguration.Builder().withAddAction().withIncludeColumn().withStatusColumn().build();
    doReturn(config).when(presenter).getConfiguration();
    final PaginatedArchetypeList paginatedArchetypeList = new PaginatedArchetypeList(Collections.emptyList(), 0, 0, 0);
    presenter.configureView(paginatedArchetypeList);
    verify(view).showAddAction(true);
    verify(view).showIncludeHeader(true);
    verify(view).showStatusHeader(true);
    verify(view).showSelectionCounter(true);
    verify(view).showNoResults(false);
    verify(view).showPagination(false);
    verify(view).showToolbar(false);
    verify(view).showEmpty(true);
}
Also used : PaginatedArchetypeList(org.kie.workbench.common.screens.archetype.mgmt.shared.model.PaginatedArchetypeList) ArchetypeTableConfiguration(org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)13 ArchetypeTableConfiguration (org.kie.workbench.common.screens.archetype.mgmt.client.table.config.ArchetypeTableConfiguration)13 PaginatedArchetypeList (org.kie.workbench.common.screens.archetype.mgmt.shared.model.PaginatedArchetypeList)3