1
1
package com .thealgorithms .dynamicprogramming ;
2
2
3
- import static org .junit .jupiter .api .Assertions .assertTrue ;
4
3
import static org .junit .jupiter .api .Assertions .assertFalse ;
4
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
5
5
6
6
import org .junit .jupiter .api .Test ;
7
7
@@ -20,8 +20,7 @@ class NewManShanksPrimeTest {
20
20
void testNthManShanksPrime1 () {
21
21
int n = 1 ;
22
22
int expectedAnswer = 1 ;
23
- assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ),
24
- "The 1st New Man Shanks prime should be 1." );
23
+ assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ), "The 1st New Man Shanks prime should be 1." );
25
24
}
26
25
27
26
/**
@@ -32,8 +31,7 @@ void testNthManShanksPrime1() {
32
31
void testNthManShanksPrime2 () {
33
32
int n = 2 ;
34
33
int expectedAnswer = 3 ;
35
- assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ),
36
- "The 2nd New Man Shanks prime should be 3." );
34
+ assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ), "The 2nd New Man Shanks prime should be 3." );
37
35
}
38
36
39
37
/**
@@ -44,8 +42,7 @@ void testNthManShanksPrime2() {
44
42
void testNthManShanksPrime3 () {
45
43
int n = 3 ;
46
44
int expectedAnswer = 7 ;
47
- assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ),
48
- "The 3rd New Man Shanks prime should be 7." );
45
+ assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ), "The 3rd New Man Shanks prime should be 7." );
49
46
}
50
47
51
48
/**
@@ -56,8 +53,7 @@ void testNthManShanksPrime3() {
56
53
void testNthManShanksPrime4 () {
57
54
int n = 4 ;
58
55
int expectedAnswer = 17 ;
59
- assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ),
60
- "The 4th New Man Shanks prime should be 17." );
56
+ assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ), "The 4th New Man Shanks prime should be 17." );
61
57
}
62
58
63
59
/**
@@ -68,8 +64,7 @@ void testNthManShanksPrime4() {
68
64
void testNthManShanksPrime5 () {
69
65
int n = 5 ;
70
66
int expectedAnswer = 41 ;
71
- assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ),
72
- "The 5th New Man Shanks prime should be 41." );
67
+ assertTrue (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ), "The 5th New Man Shanks prime should be 41." );
73
68
}
74
69
75
70
/**
@@ -80,7 +75,6 @@ void testNthManShanksPrime5() {
80
75
void testNthManShanksPrimeIncorrectAnswer () {
81
76
int n = 2 ;
82
77
int expectedAnswer = 4 ; // Incorrect expected value
83
- assertFalse (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ),
84
- "The 2nd New Man Shanks prime should not be 4." );
78
+ assertFalse (NewManShanksPrime .nthManShanksPrime (n , expectedAnswer ), "The 2nd New Man Shanks prime should not be 4." );
85
79
}
86
80
}
0 commit comments