Commitment unit tests
This commit is contained in:
parent
6333067335
commit
0d1987ce38
16
src/test/java/Main/CommitmentTest.java
Normal file
16
src/test/java/Main/CommitmentTest.java
Normal 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());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user