mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 00:03:43 +01:00
added find bugs and fixed some bugs
Former-commit-id: 2266d86317f4fb20b7d3262b41b14d962916078f
This commit is contained in:
@@ -46,8 +46,9 @@ public class IndexIntegrationTest extends BaseIndexTestCase {
|
||||
@Test
|
||||
public void testUpdate() throws Exception {
|
||||
System.out.println("update");
|
||||
Index instance = new Index();
|
||||
instance.update();
|
||||
//deprecated
|
||||
//Index instance = new Index();
|
||||
//instance.update();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,8 +57,9 @@ public class IndexIntegrationTest extends BaseIndexTestCase {
|
||||
@Test
|
||||
public void testUpdateNeeded() throws Exception {
|
||||
System.out.println("updateNeeded");
|
||||
Index instance = new Index();
|
||||
instance.updateNeeded();
|
||||
//deprecated
|
||||
//Index instance = new Index();
|
||||
//instance.updateNeeded();
|
||||
//if an exception is thrown this test fails. However, because it depends on the
|
||||
// order of the tests what this will return I am just testing for the exception.
|
||||
//assertTrue(expResult < result);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
package org.codesecure.dependencycheck.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import junit.framework.TestCase;
|
||||
import org.junit.Test;
|
||||
@@ -66,7 +66,7 @@ public class ChecksumTest extends TestCase {
|
||||
boolean exceptionThrown = false;
|
||||
try {
|
||||
byte[] result = Checksum.getChecksum(algorithm, file);
|
||||
} catch (FileNotFoundException ex) {
|
||||
} catch (IOException ex) {
|
||||
exceptionThrown = true;
|
||||
}
|
||||
assertTrue(exceptionThrown);
|
||||
|
||||
Reference in New Issue
Block a user