forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGoldbachConjectureTest.java
37 lines (34 loc) · 1009 Bytes
/
GoldbachConjectureTest.java
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
26
27
28
29
30
31
32
33
34
35
36
37
package com.thealgorithms.maths;
import static com.thealgorithms.maths.GoldbachConjecture.getPrimeSum;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class GoldbachConjectureTest {
@Test
void goldbachTestWithZero() {
Assertions.assertEquals("Wrong Input", getPrimeSum(0));
}
@Test
void goldbachTestWithNegative() {
Assertions.assertEquals("Wrong Input", getPrimeSum(-50));
}
@Test
void goldbachTestWith2() {
Assertions.assertEquals("Wrong Input", getPrimeSum(2));
}
@Test
void goldbachTestWithOdd() {
Assertions.assertEquals("Wrong Input", getPrimeSum(25));
}
@Test
void goldbachTestEven1() {
Assertions.assertEquals("3 + 5 = 8", getPrimeSum(8));
}
@Test
void goldbachTestEven2() {
Assertions.assertEquals("3 + 19 = 22", getPrimeSum(22));
}
@Test
void goldbachTest1() {
Assertions.assertEquals("3 + 7 = 10", getPrimeSum(10));
}
}