use of com.synopsys.integration.detectable.detectable.inspector.nuget.NugetInspectorResolver in project synopsys-detect by blackducksoftware.
the class NugetSolutionDetectableTest method testApplicableForSolution.
@Test
public void testApplicableForSolution() {
NugetInspectorResolver nugetInspectorManager = null;
NugetInspectorExtractor nugetInspectorExtractor = null;
NugetInspectorOptions nugetInspectorOptions = null;
DetectableEnvironment environment = MockDetectableEnvironment.empty();
FileFinder fileFinder = MockFileFinder.withFileNamed("test.sln");
NugetSolutionDetectable detectable = new NugetSolutionDetectable(environment, fileFinder, nugetInspectorManager, nugetInspectorExtractor, nugetInspectorOptions);
assertTrue(detectable.applicable().getPassed());
}
use of com.synopsys.integration.detectable.detectable.inspector.nuget.NugetInspectorResolver in project synopsys-detect by blackducksoftware.
the class DetectorFactory method nugetInspectorResolver.
private NugetInspectorResolver nugetInspectorResolver(DetectInfo detectInfo) throws DetectUserFriendlyException {
NugetInspectorResolver resolver;
Optional<File> nugetAirGapPath = airGapInspectorPaths.getNugetInspectorAirGapFile();
NugetInspectorExecutableLocator executableLocator = new NugetInspectorExecutableLocator(detectInfo);
if (nugetAirGapPath.isPresent()) {
resolver = new AirgapNugetInspectorResolver(airGapInspectorPaths, executableLocator, detectInfo);
} else {
ArtifactoryNugetInspectorInstaller installer = new ArtifactoryNugetInspectorInstaller(detectInfo, artifactoryZipInstaller, executableLocator);
resolver = new OnlineNugetInspectorResolver(installer, directoryManager, installedToolManager, installedToolLocator);
}
return resolver;
}
use of com.synopsys.integration.detectable.detectable.inspector.nuget.NugetInspectorResolver in project synopsys-detect by blackducksoftware.
the class NugetProjectDetectableTest method testApplicableForRproj.
@Test
public void testApplicableForRproj() {
NugetInspectorOptions nugetInspectorOptions = null;
NugetInspectorResolver nugetInspectorResolver = null;
NugetInspectorExtractor nugetInspectorExtractor = null;
DetectableEnvironment environment = MockDetectableEnvironment.empty();
FileFinder fileFinder = MockFileFinder.withFileNamed("example.rproj");
NugetProjectDetectable detectable = new NugetProjectDetectable(environment, fileFinder, nugetInspectorOptions, nugetInspectorResolver, nugetInspectorExtractor);
assertTrue(detectable.applicable().getPassed());
}
use of com.synopsys.integration.detectable.detectable.inspector.nuget.NugetInspectorResolver in project synopsys-detect by blackducksoftware.
the class NugetSolutionDetectableTest method notApplicableForPodfile.
@Test
public void notApplicableForPodfile() {
NugetInspectorResolver nugetInspectorManager = null;
NugetInspectorExtractor nugetInspectorExtractor = null;
NugetInspectorOptions nugetInspectorOptions = null;
DetectableEnvironment environment = MockDetectableEnvironment.empty();
FileFinder fileFinder = MockFileFinder.withFileNamed("podfile.lock");
NugetSolutionDetectable detectable = new NugetSolutionDetectable(environment, fileFinder, nugetInspectorManager, nugetInspectorExtractor, nugetInspectorOptions);
assertFalse(detectable.applicable().getPassed());
}
Aggregations