mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-17 17:21:53 +01:00
Random fixes to issues found by IntelliJ IDEA code inspection.
This commit is contained in:
@@ -39,10 +39,10 @@ public class OpenSSLAnalyzerTest extends BaseTest {
|
||||
/**
|
||||
* The package analyzer to test.
|
||||
*/
|
||||
OpenSSLAnalyzer analyzer;
|
||||
private OpenSSLAnalyzer analyzer;
|
||||
|
||||
/**
|
||||
* Setup the PtyhonPackageAnalyzer.
|
||||
* Setup the {@link OpenSSLAnalyzer}.
|
||||
*
|
||||
* @throws Exception if there is a problem
|
||||
*/
|
||||
|
||||
@@ -40,7 +40,7 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
||||
/**
|
||||
* The analyzer to test.
|
||||
*/
|
||||
PythonDistributionAnalyzer analyzer;
|
||||
private PythonDistributionAnalyzer analyzer;
|
||||
|
||||
/**
|
||||
* Correctly setup the analyzer for testing.
|
||||
|
||||
@@ -40,10 +40,10 @@ public class PythonPackageAnalyzerTest extends BaseTest {
|
||||
/**
|
||||
* The package analyzer to test.
|
||||
*/
|
||||
PythonPackageAnalyzer analyzer;
|
||||
private PythonPackageAnalyzer analyzer;
|
||||
|
||||
/**
|
||||
* Setup the PtyhonPackageAnalyzer.
|
||||
* Setup the {@link PythonPackageAnalyzer}.
|
||||
*
|
||||
* @throws Exception if there is a problem
|
||||
*/
|
||||
@@ -85,14 +85,9 @@ public class PythonPackageAnalyzerTest extends BaseTest {
|
||||
|
||||
@Test
|
||||
public void testAnalyzeSourceMetadata() throws AnalysisException {
|
||||
eggtestAssertions(this,
|
||||
"python/eggtest/__init__.py");
|
||||
}
|
||||
|
||||
public void eggtestAssertions(Object context, final String resource) throws AnalysisException {
|
||||
boolean found = false;
|
||||
final Dependency result = new Dependency(BaseTest.getResourceAsFile(
|
||||
context, resource));
|
||||
this, "python/eggtest/__init__.py"));
|
||||
analyzer.analyze(result, null);
|
||||
assertTrue("Expected vendor evidence to contain \"example\".", result
|
||||
.getVendorEvidence().toString().contains("example"));
|
||||
@@ -104,4 +99,5 @@ public class PythonPackageAnalyzerTest extends BaseTest {
|
||||
}
|
||||
assertTrue("Version 0.0.1 not found in EggTest dependency.", found);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user