use of com.synopsys.integration.detectable.DetectableEnvironment in project synopsys-detect by blackducksoftware.
the class BazelDetectableTest method testApplicable.
@Test
public void testApplicable() {
DetectableEnvironment environment = MockDetectableEnvironment.empty();
FileFinder fileFinder = Mockito.mock(FileFinder.class);
Mockito.when(fileFinder.findFile(new File("."), "WORKSPACE")).thenReturn(new File("src/test/resources/functional/bazel/WORKSPACE"));
BazelExtractor bazelExtractor = null;
BazelResolver bazelResolver = null;
BazelDetectableOptions bazelDetectableOptions = new BazelDetectableOptions("target", null, null);
BazelDetectable detectable = new BazelDetectable(environment, fileFinder, bazelExtractor, bazelResolver, bazelDetectableOptions.getTargetName().orElse(null));
assertTrue(detectable.applicable().getPassed());
}
use of com.synopsys.integration.detectable.DetectableEnvironment in project synopsys-detect by blackducksoftware.
the class ClangDetectableTest method testApplicable.
@Test
public void testApplicable() {
DetectableExecutableRunner executableRunner = null;
List<ClangPackageManager> availablePackageManagers = new ArrayList<>(0);
ClangExtractor clangExtractor = null;
ClangPackageManagerRunner packageManagerRunner = null;
ClangDetectableOptions options = new ClangDetectableOptions(false);
DetectableEnvironment environment = MockDetectableEnvironment.empty();
FileFinder fileFinder = MockFileFinder.withFileNamed(JSON_COMPILATION_DATABASE_FILENAME);
ClangDetectable detectable = new ClangDetectable(environment, executableRunner, fileFinder, availablePackageManagers, clangExtractor, options, packageManagerRunner);
assertTrue(detectable.applicable().getPassed());
}
use of com.synopsys.integration.detectable.DetectableEnvironment in project synopsys-detect by blackducksoftware.
the class DockerDetectableTest method testApplicable.
@Test
public void testApplicable() {
DetectableEnvironment environment = null;
DockerInspectorResolver dockerInspectorResolver = null;
JavaResolver javaResolver = null;
DockerResolver dockerResolver = null;
DockerExtractor dockerExtractor = null;
DockerDetectableOptions dockerDetectableOptions = Mockito.mock(DockerDetectableOptions.class);
Mockito.when(dockerDetectableOptions.hasDockerImageOrTar()).thenReturn(Boolean.TRUE);
DockerDetectable detectable = new DockerDetectable(environment, dockerInspectorResolver, javaResolver, dockerResolver, dockerExtractor, dockerDetectableOptions);
DetectableResult result = detectable.applicable();
assertTrue(result.getPassed() || result instanceof WrongOperatingSystemResult);
}
Aggregations