mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 07:43:40 +01:00
patch to resolve issue #202
Former-commit-id: 576831ec73c00b957a6700dd753894f5429de071
This commit is contained in:
@@ -158,7 +158,8 @@ public class DependencyTest {
|
||||
|
||||
Dependency instance = new Dependency(file);
|
||||
//assertEquals("89CE9E36AA9A9E03F1450936D2F4F8DD0F961F8B", result.getSha1sum());
|
||||
String expResult = "C30B57142E1CCBC1EFD5CD15F307358F";
|
||||
//String expResult = "C30B57142E1CCBC1EFD5CD15F307358F";
|
||||
String expResult = "c30b57142e1ccbc1efd5cd15f307358f";
|
||||
String result = instance.getMd5sum();
|
||||
assertEquals(expResult, result);
|
||||
}
|
||||
@@ -182,7 +183,8 @@ public class DependencyTest {
|
||||
//File file = new File(this.getClass().getClassLoader().getResource("struts2-core-2.1.2.jar").getPath());
|
||||
File file = BaseTest.getResourceAsFile(this, "struts2-core-2.1.2.jar");
|
||||
Dependency instance = new Dependency(file);
|
||||
String expResult = "89CE9E36AA9A9E03F1450936D2F4F8DD0F961F8B";
|
||||
//String expResult = "89CE9E36AA9A9E03F1450936D2F4F8DD0F961F8B";
|
||||
String expResult = "89ce9e36aa9a9e03f1450936d2f4f8dd0f961f8b";
|
||||
String result = instance.getSha1sum();
|
||||
assertEquals(expResult, result);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public final class Checksum {
|
||||
/**
|
||||
* Hex code characters used in getHex.
|
||||
*/
|
||||
private static final String HEXES = "0123456789ABCDEF";
|
||||
private static final String HEXES = "0123456789abcdef";
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -60,8 +60,7 @@ public class ChecksumTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of getChecksum method, of class Checksum. This checks that an exception is thrown when an invalid path is
|
||||
* specified.
|
||||
* Test of getChecksum method, of class Checksum. This checks that an exception is thrown when an invalid path is specified.
|
||||
*
|
||||
* @throws Exception is thrown when an exception occurs.
|
||||
*/
|
||||
@@ -75,8 +74,8 @@ public class ChecksumTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of getChecksum method, of class Checksum. This checks that an exception is thrown when an invalid algorithm
|
||||
* is specified.
|
||||
* Test of getChecksum method, of class Checksum. This checks that an exception is thrown when an invalid algorithm is
|
||||
* specified.
|
||||
*
|
||||
* @throws Exception is thrown when an exception occurs.
|
||||
*/
|
||||
@@ -97,7 +96,8 @@ public class ChecksumTest {
|
||||
@Test
|
||||
public void testGetMD5Checksum() throws Exception {
|
||||
File file = new File(this.getClass().getClassLoader().getResource("checkSumTest.file").getPath());
|
||||
String expResult = "F0915C5F46B8CFA283E5AD67A09B3793";
|
||||
//String expResult = "F0915C5F46B8CFA283E5AD67A09B3793";
|
||||
String expResult = "f0915c5f46b8cfa283e5ad67a09b3793";
|
||||
String result = Checksum.getMD5Checksum(file);
|
||||
Assert.assertEquals(expResult, result);
|
||||
}
|
||||
@@ -110,7 +110,8 @@ public class ChecksumTest {
|
||||
@Test
|
||||
public void testGetSHA1Checksum() throws Exception {
|
||||
File file = new File(this.getClass().getClassLoader().getResource("checkSumTest.file").getPath());
|
||||
String expResult = "B8A9FF28B21BCB1D0B50E24A5243D8B51766851A";
|
||||
//String expResult = "B8A9FF28B21BCB1D0B50E24A5243D8B51766851A";
|
||||
String expResult = "b8a9ff28b21bcb1d0b50e24a5243d8b51766851a";
|
||||
String result = Checksum.getSHA1Checksum(file);
|
||||
Assert.assertEquals(expResult, result);
|
||||
}
|
||||
@@ -121,7 +122,8 @@ public class ChecksumTest {
|
||||
@Test
|
||||
public void testGetHex() {
|
||||
byte[] raw = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
|
||||
String expResult = "000102030405060708090A0B0C0D0E0F10";
|
||||
//String expResult = "000102030405060708090A0B0C0D0E0F10";
|
||||
String expResult = "000102030405060708090a0b0c0d0e0f10";
|
||||
String result = Checksum.getHex(raw);
|
||||
Assert.assertEquals(expResult, result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user