use of com.synopsys.integration.detectable.detectables.clang.dependencyfile.DependencyFileDetailGenerator in project synopsys-detect by blackducksoftware.
the class DependencyFileDetailGeneratorTest method testFileThatDoesNotExistIsSkipped.
@Test
public void testFileThatDoesNotExistIsSkipped() {
File mockFile = Mockito.mock(File.class);
Mockito.when(mockFile.toString()).thenReturn("Example");
FilePathGenerator filePathGenerator = Mockito.mock(FilePathGenerator.class);
Mockito.when(filePathGenerator.fromCompileCommand(mockFile, null, true)).thenReturn(Collections.singletonList("does_not_exist.h"));
DependencyFileDetailGenerator dependencyFileDetailGenerator = new DependencyFileDetailGenerator(filePathGenerator);
Set<File> fileDetailsSet = dependencyFileDetailGenerator.fromCompileCommands(Collections.singletonList(new CompileCommand()), null, true);
Assertions.assertEquals(0, fileDetailsSet.size());
}
Aggregations