Commitment unit tests

This commit is contained in:
Marcin Kostrzewski 2020-10-28 17:35:18 +01:00
parent 6333067335
commit 0d1987ce38

View File

@ -0,0 +1,16 @@
package Main;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class CommitmentTest {
@Test
public void CommitmentHashingTest(){
Commitment alice = new Commitment("Test");
Commitment bob = new Commitment(alice.getSequenceA(), alice.getHash());
bob.setSequenceB(alice.getSequenceB());
bob.setMessage(alice.getMessage());
assertTrue(bob.checkHash());
}
}