@Test public void infrascan_triggers_not_codescanstrategy() { SerecoVulnerability vulnerability = TestSerecoVulnerabilityBuilder.builder(). name("name1"). infraScan(). end().build(); FalsePositiveMetaData metaData = fetchFirstEntryMetaDataOfExample3(); finderToTest.isFound(vulnerability, metaData); verify(codeSCanStrategy,never()).isFalsePositive(vulnerability, metaData); }
public boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData) { if (! isVulnerabilityValid(vulnerability)) { return false; } if (! isMetaDataValid(metaData)) { return false; } switch (vulnerability.getScanType()) { case CODE_SCAN: return codeSCanStrategy.isFalsePositive(vulnerability, metaData); default: return false; } }
SerecoFalsePositiveFinder { public boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData) { if (! isVulnerabilityValid(vulnerability)) { return false; } if (! isMetaDataValid(metaData)) { return false; } switch (vulnerability.getScanType()) { case CODE_SCAN: return codeSCanStrategy.isFalsePositive(vulnerability, metaData); default: return false; } } }
SerecoFalsePositiveFinder { public boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData) { if (! isVulnerabilityValid(vulnerability)) { return false; } if (! isMetaDataValid(metaData)) { return false; } switch (vulnerability.getScanType()) { case CODE_SCAN: return codeSCanStrategy.isFalsePositive(vulnerability, metaData); default: return false; } }  }
SerecoFalsePositiveFinder { public boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData) { if (! isVulnerabilityValid(vulnerability)) { return false; } if (! isMetaDataValid(metaData)) { return false; } switch (vulnerability.getScanType()) { case CODE_SCAN: return codeSCanStrategy.isFalsePositive(vulnerability, metaData); default: return false; } }  boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData); }
SerecoFalsePositiveFinder { public boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData) { if (! isVulnerabilityValid(vulnerability)) { return false; } if (! isMetaDataValid(metaData)) { return false; } switch (vulnerability.getScanType()) { case CODE_SCAN: return codeSCanStrategy.isFalsePositive(vulnerability, metaData); default: return false; } }  boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData);  }