From ac7e70883c18602e7fd4b525b9e6fb9ea9620a6b Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 20 Jan 2021 19:50:42 +0800 Subject: refactor --- .../identifier/Sha256IdentifierTest.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/java/com/keuin/kbackupfabric/backup/incremental/identifier/Sha256IdentifierTest.java (limited to 'src/test/java/com/keuin/kbackupfabric/backup/incremental/identifier/Sha256IdentifierTest.java') diff --git a/src/test/java/com/keuin/kbackupfabric/backup/incremental/identifier/Sha256IdentifierTest.java b/src/test/java/com/keuin/kbackupfabric/backup/incremental/identifier/Sha256IdentifierTest.java new file mode 100644 index 0000000..9cd1762 --- /dev/null +++ b/src/test/java/com/keuin/kbackupfabric/backup/incremental/identifier/Sha256IdentifierTest.java @@ -0,0 +1,25 @@ +package com.keuin.kbackupfabric.backup.incremental.identifier; + +import org.junit.Test; + +import java.io.File; +import java.io.IOException; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class Sha256IdentifierTest { + + @Test + public void fromFile() { + try { + Sha256Identifier sha256 = Sha256Identifier.fromFile(new File("./testfile/Sha256IdentifierTest")); + String str = sha256.getIdentification().toUpperCase(); + assertEquals("S2-315F5BDB76D078C43B8AC0064E4A0164612B1FCE77C869345BFC94C75894EDD3", str); + } catch (IOException e) { + e.printStackTrace(); + fail(); + } + } + +} \ No newline at end of file -- cgit v1.2.3