Search in sources :

Example 1 with TransitiveEnhancedDependency

use of org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency in project kie-wb-common by kiegroup.

the class DependenciesItemPresenterTest method testSetupTransitive.

@Test
public void testSetupTransitive() {
    dependenciesItemPresenter.setup(new TransitiveEnhancedDependency(mock(Dependency.class), emptySet()), new WhiteList(), mock(DependenciesPresenter.class));
    verify(view).init(any());
    verify(view).setGroupId(any());
    verify(view).setArtifactId(any());
    verify(view).setVersion(any());
    verify(view).setPackagesWhiteListedState(any());
    verify(view).setTransitiveDependency(eq(true));
}
Also used : TransitiveEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency) WhiteList(org.kie.workbench.common.services.shared.whitelist.WhiteList) Test(org.junit.Test)

Example 2 with TransitiveEnhancedDependency

use of org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency in project kie-wb-common by kiegroup.

the class DependenciesItemPresenter method setup.

public DependenciesItemPresenter setup(final EnhancedDependency enhancedDependency, final WhiteList whiteList, final DependenciesPresenter dependenciesPresenter) {
    this.enhancedDependency = enhancedDependency;
    this.parentPresenter = dependenciesPresenter;
    final Dependency dependency = enhancedDependency.getDependency();
    view.init(this);
    view.setGroupId(dependency.getGroupId());
    view.setArtifactId(dependency.getArtifactId());
    view.setVersion(dependency.getVersion());
    view.setPackagesWhiteListedState(WhiteListedPackagesState.from(whiteList, enhancedDependency.getPackages()));
    view.setTransitiveDependency(enhancedDependency instanceof TransitiveEnhancedDependency);
    return this;
}
Also used : TransitiveEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency) Dependency(org.guvnor.common.services.project.model.Dependency) EnhancedDependency(org.kie.workbench.common.services.shared.dependencies.EnhancedDependency) TransitiveEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency)

Aggregations

TransitiveEnhancedDependency (org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency)2 Dependency (org.guvnor.common.services.project.model.Dependency)1 Test (org.junit.Test)1 EnhancedDependency (org.kie.workbench.common.services.shared.dependencies.EnhancedDependency)1 WhiteList (org.kie.workbench.common.services.shared.whitelist.WhiteList)1