use of org.kie.workbench.common.screens.archetype.mgmt.shared.model.Archetype in project kie-wb-common by kiegroup.
the class ArchetypeItemPresenterTest method setupWhenHideDefaultBadgeTest.
@Test
public void setupWhenHideDefaultBadgeTest() {
final Archetype archetype = createArchetypeWithStatus(ArchetypeStatus.VALID);
final ArchetypeItem archetypeItem = new ArchetypeItem(archetype, true, false);
presenter.setup(archetypeItem, tablePresenter);
verify(view).showDefaultBadge(false);
}
use of org.kie.workbench.common.screens.archetype.mgmt.shared.model.Archetype in project kie-wb-common by kiegroup.
the class ArchetypeItemPresenterTest method makeDefaultWhenIsNotValidTest.
@Test
public void makeDefaultWhenIsNotValidTest() {
final Archetype archetype = createArchetypeWithStatus(ArchetypeStatus.INVALID);
final ArchetypeItem archetypeItem = new ArchetypeItem(archetype, true, true);
doReturn(true).when(tablePresenter).canMakeChanges();
presenter.setup(archetypeItem, tablePresenter);
presenter.makeDefault();
verify(presenter, never()).setIncluded(true);
verify(tablePresenter, never()).makeDefaultValue(any(), anyBoolean());
}
use of org.kie.workbench.common.screens.archetype.mgmt.shared.model.Archetype in project kie-wb-common by kiegroup.
the class ArchetypeItemPresenterTest method setupWhenDisableIncludeTest.
@Test
public void setupWhenDisableIncludeTest() {
final Archetype archetype = createArchetypeWithStatus(ArchetypeStatus.INVALID);
final ArchetypeItem archetypeItem = new ArchetypeItem(archetype, true, true);
presenter.setup(archetypeItem, tablePresenter);
verify(view).enableIncludeCheckbox(false);
}
use of org.kie.workbench.common.screens.archetype.mgmt.shared.model.Archetype in project kie-wb-common by kiegroup.
the class ArchetypeItemPresenterTest method setupWhenInvalidStatusTest.
@Test
public void setupWhenInvalidStatusTest() {
final Archetype archetype = createArchetypeWithStatus(ArchetypeStatus.INVALID);
final ArchetypeItem archetypeItem = new ArchetypeItem(archetype, true, true);
presenter.setup(archetypeItem, tablePresenter);
verify(view).enableIncludeCheckbox(false);
verify(view).enableSetDefault(false);
verify(view).showValidStatus(false);
verify(view).showInvalidStatus(true);
verify(view).setInvalidTooltip(Mockito.<String>any());
verify(view, never()).setValidTooltip(Mockito.<String>any());
}
use of org.kie.workbench.common.screens.archetype.mgmt.shared.model.Archetype in project kie-wb-common by kiegroup.
the class ArchetypeItemPresenterTest method setupWhenDisableSetDefaultTest.
@Test
public void setupWhenDisableSetDefaultTest() {
final Archetype archetype = createArchetypeWithStatus(ArchetypeStatus.INVALID);
final ArchetypeItem archetypeItem = new ArchetypeItem(archetype, true, true);
presenter.setup(archetypeItem, tablePresenter);
verify(view).enableSetDefault(false);
}
Aggregations