Search in sources :

Example 1 with NpmPackageJsonParseDetectable

use of com.synopsys.integration.detectable.detectables.npm.packagejson.NpmPackageJsonParseDetectable 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());
}
Also used : NpmPackageJsonParseDetectableOptions(com.synopsys.integration.detectable.detectables.npm.packagejson.NpmPackageJsonParseDetectableOptions) MockFileFinder(com.synopsys.integration.detectable.util.MockFileFinder) FileFinder(com.synopsys.integration.common.util.finder.FileFinder) NpmDependencyType(com.synopsys.integration.detectable.detectables.npm.NpmDependencyType) DetectableEnvironment(com.synopsys.integration.detectable.DetectableEnvironment) MockDetectableEnvironment(com.synopsys.integration.detectable.util.MockDetectableEnvironment) NpmPackageJsonParseDetectable(com.synopsys.integration.detectable.detectables.npm.packagejson.NpmPackageJsonParseDetectable) Test(org.junit.jupiter.api.Test)

Aggregations

FileFinder (com.synopsys.integration.common.util.finder.FileFinder)1 DetectableEnvironment (com.synopsys.integration.detectable.DetectableEnvironment)1 NpmDependencyType (com.synopsys.integration.detectable.detectables.npm.NpmDependencyType)1 NpmPackageJsonParseDetectable (com.synopsys.integration.detectable.detectables.npm.packagejson.NpmPackageJsonParseDetectable)1 NpmPackageJsonParseDetectableOptions (com.synopsys.integration.detectable.detectables.npm.packagejson.NpmPackageJsonParseDetectableOptions)1 MockDetectableEnvironment (com.synopsys.integration.detectable.util.MockDetectableEnvironment)1 MockFileFinder (com.synopsys.integration.detectable.util.MockFileFinder)1 Test (org.junit.jupiter.api.Test)1