use of com.synopsys.integration.detect.lifecycle.run.step.BinaryScanStepRunner in project synopsys-detect by blackducksoftware.
the class BinaryUploadOperationTest method testShouldFailOnDirectory.
@Test
public void testShouldFailOnDirectory() throws OperationException {
BinaryScanOptions binaryScanOptions = new BinaryScanOptions(Paths.get("."), null, 0, false);
OperationFactory operationFactory = Mockito.mock(OperationFactory.class);
Mockito.when(operationFactory.calculateBinaryScanOptions()).thenReturn(binaryScanOptions);
BinaryScanStepRunner binaryScanStepRunner = new BinaryScanStepRunner(operationFactory);
Optional<File> result = binaryScanStepRunner.determineBinaryScanFileTarget(DockerTargetData.NO_DOCKER_TARGET);
Mockito.verify(operationFactory).publishBinaryFailure(Mockito.anyString());
Assertions.assertFalse(result.isPresent());
}
Aggregations