Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simple test for ContentDigest helper class
- Loading branch information
Showing
2 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
12 changes: 5 additions & 7 deletions
12
fcrepo-kernel/src/main/java/org/fcrepo/utils/ContentDigest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
fcrepo-kernel/src/test/java/org/fcrepo/utils/ContentDigestTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
package org.fcrepo.utils; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import java.net.URI; | ||
|
||
import org.junit.Test; | ||
|
||
public class ContentDigestTest { | ||
|
||
@Test | ||
public void testSHA_1() { | ||
assertEquals("Failed to produce a proper content digest URI!", URI | ||
.create("urn:sha1:fake"), ContentDigest.asURI("SHA-1", "fake")); | ||
} | ||
|
||
} |