Skip to content

Commit

Permalink
refs LibraryOfCongress#119 - reverting change to name of message digests
Browse files Browse the repository at this point in the history
  • Loading branch information
jscancella authored and Richard van Heest committed Feb 20, 2019
1 parent ce98451 commit 1567d55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public void testReadWriteProducesSameBag() throws Exception{
testTagFileContents(bag, newBagDir);

testBagsStructureAreEqual(bagDir, newBagDir);
delete(newBagDir);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/
public enum StandardSupportedAlgorithms implements SupportedAlgorithm{
MD5("MD5"),
SHA1("SHA1"),
SHA224("SHA224"),
SHA256("SHA256"),
SHA512("SHA512");
SHA1("SHA-1"),
SHA224("SHA-224"),
SHA256("SHA-256"),
SHA512("SHA-512");

private final String messageDigestName;

Expand Down
5 changes: 4 additions & 1 deletion src/test/java/gov/loc/repository/bagit/TempFolderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.nio.file.attribute.BasicFileAttributes;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;

abstract public class TempFolderTest {
Expand All @@ -21,6 +22,8 @@ public void setupTempFolder() throws IOException{
@AfterEach
public void teardownTempFolder() throws IOException{
delete(folder);
Assertions.assertFalse(Files.exists(folder));
//Assertions.assertEquals(0, Files.list(folder).count());
}

public Path createDirectory(String name) throws IOException {
Expand All @@ -33,7 +36,7 @@ public Path createFile(String name) throws IOException {
return Files.createFile(newFile);
}

private void delete(Path tempDirectory) throws IOException {
protected void delete(Path tempDirectory) throws IOException {
Files.walkFileTree(tempDirectory, new SimpleFileVisitor<Path>() {

@Override
Expand Down

0 comments on commit 1567d55

Please sign in to comment.