use of com.synopsys.integration.detectable.detectables.pipenv.parse.PipfileLockDependencyTransformer in project synopsys-detect by blackducksoftware.
the class DetectableFactory method createPipfileLockDetectable.
public PipfileLockDetectable createPipfileLockDetectable(DetectableEnvironment environment, PipfileLockDetectableOptions pipfileLockDetectableOptions) {
PipfileLockDependencyVersionParser dependencyVersionParser = new PipfileLockDependencyVersionParser();
PipfileLockTransformer pipfileLockTransformer = new PipfileLockTransformer(dependencyVersionParser, pipfileLockDetectableOptions.getDependencyTypeFilter());
PipfileLockDependencyTransformer pipfileLockDependencyTransformer = new PipfileLockDependencyTransformer();
PipfileLockExtractor pipfileLockExtractor = new PipfileLockExtractor(gson, pipfileLockTransformer, pipfileLockDependencyTransformer);
return new PipfileLockDetectable(environment, fileFinder, pipfileLockExtractor);
}
use of com.synopsys.integration.detectable.detectables.pipenv.parse.PipfileLockDependencyTransformer in project synopsys-detect by blackducksoftware.
the class PipfileLockDependencyTransformerTest method testTransform.
@Test
public void testTransform() {
List<PipfileLockDependency> dependencies = Arrays.asList(new PipfileLockDependency("comp1", "1.0"), new PipfileLockDependency("comp2", "2.0"));
PipfileLockDependencyTransformer transformer = new PipfileLockDependencyTransformer();
DependencyGraph dependencyGraph = transformer.transform(dependencies);
NameVersionGraphAssert graphAssert = new NameVersionGraphAssert(Forge.PYPI, dependencyGraph);
graphAssert.hasRootSize(2);
graphAssert.hasRootDependency("comp1", "1.0");
graphAssert.hasRootDependency("comp2", "2.0");
}
Aggregations