diff options
author | Keuin <[email protected]> | 2021-01-12 12:51:23 +0800 |
---|---|---|
committer | keuin <[email protected]> | 2021-01-12 12:51:23 +0800 |
commit | afd26cdd12fef4bd2aafa2ac8d708e18d277a2fe (patch) | |
tree | e389ccbe9fb48e03de25b38d3ef7d5c273c5ec97 /src/test | |
parent | 8b05c48d76bbb05c2b440e57df1d9b3323edc598 (diff) |
Implement object collection(not tested) and sha256(tested)
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/keuin/kbackupfabric/util/backup/incremental/identifier/Sha256IdentifierTest.java | 23 | ||||
-rw-r--r-- | src/test/sha256 | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/java/com/keuin/kbackupfabric/util/backup/incremental/identifier/Sha256IdentifierTest.java b/src/test/java/com/keuin/kbackupfabric/util/backup/incremental/identifier/Sha256IdentifierTest.java new file mode 100644 index 0000000..2296e01 --- /dev/null +++ b/src/test/java/com/keuin/kbackupfabric/util/backup/incremental/identifier/Sha256IdentifierTest.java @@ -0,0 +1,23 @@ +package com.keuin.kbackupfabric.util.backup.incremental.identifier; + +import org.junit.Test; + +import java.io.File; +import java.io.IOException; + +import static org.junit.Assert.assertEquals; + +public class Sha256IdentifierTest { + + @Test + public void fromFile() { + try { + Sha256Identifier sha256 = Sha256Identifier.fromFile(new File("./src/test/sha256")); + String str = sha256.getIdentification().toUpperCase(); + assertEquals("315F5BDB76D078C43B8AC0064E4A0164612B1FCE77C869345BFC94C75894EDD3", str); + } catch (IOException e) { + e.printStackTrace(); + } + } + +}
\ No newline at end of file diff --git a/src/test/sha256 b/src/test/sha256 new file mode 100644 index 0000000..5dd01c1 --- /dev/null +++ b/src/test/sha256 @@ -0,0 +1 @@ +Hello, world!
\ No newline at end of file |