summaryrefslogtreecommitdiff
path: root/src/test/java/com/keuin/kbackupfabric/backup/incremental/identifier/Sha256IdentifierTest.java
blob: 9cd1762a99fe4e9fbaf54782cba81efd2244c736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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();
        }
    }

}