mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 18:11:47 +01:00
minor format/comment updates
Former-commit-id: 40f4da7591189b7f3b31a51120df75c709f18f04
This commit is contained in:
@@ -39,8 +39,16 @@ import org.owasp.dependencycheck.dependency.Evidence;
|
|||||||
*/
|
*/
|
||||||
public class PythonDistributionAnalyzerTest extends BaseTest {
|
public class PythonDistributionAnalyzerTest extends BaseTest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The analyzer to test.
|
||||||
|
*/
|
||||||
PythonDistributionAnalyzer analyzer;
|
PythonDistributionAnalyzer analyzer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correctly setup the analyzer for testing.
|
||||||
|
*
|
||||||
|
* @throws Exception thrown if there is a problem
|
||||||
|
*/
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
analyzer = new PythonDistributionAnalyzer();
|
analyzer = new PythonDistributionAnalyzer();
|
||||||
@@ -48,6 +56,11 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
|||||||
analyzer.initialize();
|
analyzer.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleanup the analyzer's temp files, etc.
|
||||||
|
*
|
||||||
|
* @throws Exception thrown if there is a problem
|
||||||
|
*/
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
analyzer.close();
|
analyzer.close();
|
||||||
@@ -95,7 +108,7 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
|||||||
/**
|
/**
|
||||||
* Test of inspect method, of class PythonDistributionAnalyzer.
|
* Test of inspect method, of class PythonDistributionAnalyzer.
|
||||||
*
|
*
|
||||||
* @throws Exception is thrown when an exception occurs.
|
* @throws AnalysisException is thrown when an exception occurs.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testAnalyzeWheel() throws AnalysisException {
|
public void testAnalyzeWheel() throws AnalysisException {
|
||||||
@@ -113,8 +126,7 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
|||||||
final Dependency result = new Dependency(BaseTest.getResourceAsFile(
|
final Dependency result = new Dependency(BaseTest.getResourceAsFile(
|
||||||
this, "python/site-packages/Django-1.7.2.dist-info/METADATA"));
|
this, "python/site-packages/Django-1.7.2.dist-info/METADATA"));
|
||||||
djangoAssertions(result);
|
djangoAssertions(result);
|
||||||
assertEquals("Django-1.7.2.dist-info/METADATA",
|
assertEquals("Django-1.7.2.dist-info/METADATA", result.getDisplayFileName());
|
||||||
result.getDisplayFileName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void djangoAssertions(final Dependency result)
|
private void djangoAssertions(final Dependency result)
|
||||||
@@ -134,8 +146,7 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAnalyzeEggInfoFolder() throws AnalysisException {
|
public void testAnalyzeEggInfoFolder() throws AnalysisException {
|
||||||
eggtestAssertions(this,
|
eggtestAssertions(this, "python/site-packages/EggTest.egg-info/PKG-INFO");
|
||||||
"python/site-packages/EggTest.egg-info/PKG-INFO");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -150,9 +161,7 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAnalyzeEggFolder() throws AnalysisException {
|
public void testAnalyzeEggFolder() throws AnalysisException {
|
||||||
eggtestAssertions(
|
eggtestAssertions(this, "python/site-packages/EggTest-0.0.1-py2.7.egg/EGG-INFO/PKG-INFO");
|
||||||
this,
|
|
||||||
"python/site-packages/EggTest-0.0.1-py2.7.egg/EGG-INFO/PKG-INFO");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void eggtestAssertions(Object context, final String resource) throws AnalysisException {
|
public void eggtestAssertions(Object context, final String resource) throws AnalysisException {
|
||||||
|
|||||||
Reference in New Issue
Block a user