use of com.synopsys.integration.detectable.detectables.npm.lockfile.model.NpmDependency in project synopsys-detect by blackducksoftware.
the class NpmWithoutRequiresExcludesTest method testDevDependencyExcluded.
@Test
public void testDevDependencyExcluded() {
PackageLock packageLock = new PackageLock();
packageLock.dependencies = new HashMap<>();
List<NpmDependency> resolvedDependencies = new ArrayList<>();
resolvedDependencies.add(new NpmDependency("example", "1.0.0", true, true));
NpmProject npmProject = new NpmProject(Strings.EMPTY, Strings.EMPTY, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), resolvedDependencies);
NpmLockfileGraphTransformer graphTransformer = new NpmLockfileGraphTransformer(EnumListFilter.fromExcluded(NpmDependencyType.DEV, NpmDependencyType.PEER));
DependencyGraph graph = graphTransformer.transform(packageLock, npmProject, Collections.emptyList());
GraphAssert graphAssert = new GraphAssert(Forge.NPMJS, graph);
graphAssert.hasRootSize(0);
}
Aggregations