1 package civitas.crypto.petcommitment;
2
3 import static org.junit.jupiter.api.Assertions.assertFalse;
4 import static org.junit.jupiter.api.Assertions.assertTrue;
5
6 import org.junit.jupiter.api.DisplayName;
7 import org.junit.jupiter.api.Test;
8 import org.mockito.InjectMocks;
9
10 import civitas.crypto.Constants;
11 import civitas.crypto.msg.ElGamalMsg;
12 import io.github.magwas.testing.TestBase;
13
14 class IsPetResultTest extends TestBase implements Constants {
15
16 @InjectMocks
17 IsPetResult isPetResult;
18
19 @Test
20 @DisplayName("it is pet result, if it equals one")
21 void test() {
22 assertTrue(isPetResult.apply(new ElGamalMsg(ONE)));
23 }
24
25 @Test
26 @DisplayName("not pet result, if it does not equal one")
27 void test1() {
28 assertFalse(isPetResult.apply(new ElGamalMsg(TWO)));
29 }
30 }