use of com.synopsys.integration.detectable.detectables.npm.NpmDependencyType in project synopsys-detect by blackducksoftware.
the class NpmPackageJsonParseDetectableTest method testApplicable.
@Test
public void testApplicable() {
DetectableEnvironment environment = MockDetectableEnvironment.empty();
FileFinder fileFinder = MockFileFinder.withFileNamed(PACKAGE_JSON_FILENAME);
EnumListFilter<NpmDependencyType> npmDependencyTypeFilter = EnumListFilter.fromExcluded(NpmDependencyType.DEV, NpmDependencyType.PEER);
NpmPackageJsonParseDetectableOptions npmPackageJsonParseDetectableOptions = new NpmPackageJsonParseDetectableOptions(npmDependencyTypeFilter);
NpmPackageJsonParseDetectable detectable = new NpmPackageJsonParseDetectable(environment, fileFinder, null);
assertTrue(detectable.applicable().getPassed());
}
use of com.synopsys.integration.detectable.detectables.npm.NpmDependencyType in project synopsys-detect by blackducksoftware.
the class PackageJsonExtractorTest method createExtractor.
private PackageJsonExtractor createExtractor(NpmDependencyType... excludedTypes) {
Gson gson = new GsonBuilder().setPrettyPrinting().create();
EnumListFilter<NpmDependencyType> npmDependencyTypeFilter = EnumListFilter.fromExcluded(excludedTypes);
return new PackageJsonExtractor(gson, new ExternalIdFactory(), npmDependencyTypeFilter);
}
use of com.synopsys.integration.detectable.detectables.npm.NpmDependencyType in project synopsys-detect by blackducksoftware.
the class PackageJsonExtractorFunctionalTest method createExtractor.
private PackageJsonExtractor createExtractor(NpmDependencyType... excludedTypes) {
Gson gson = new GsonBuilder().setPrettyPrinting().create();
EnumListFilter<NpmDependencyType> npmDependencyTypeFilter = EnumListFilter.fromExcluded(excludedTypes);
return new PackageJsonExtractor(gson, new ExternalIdFactory(), npmDependencyTypeFilter);
}
Aggregations