1
1
import org .junit .jupiter .api .Disabled ;
2
+ import org .junit .jupiter .api .DisplayName ;
2
3
import org .junit .jupiter .api .Test ;
3
4
4
5
import java .util .ArrayList ;
12
13
public class MatrixTest {
13
14
14
15
@ Test
16
+ @ DisplayName ("Can identify single saddle point" )
15
17
public void testCanIdentifySingleSaddlePoint () {
16
18
Matrix matrix = new Matrix (Arrays .asList (
17
19
Arrays .asList (9 , 8 , 7 ),
@@ -26,6 +28,7 @@ public void testCanIdentifySingleSaddlePoint() {
26
28
27
29
@ Disabled ("Remove to run test" )
28
30
@ Test
31
+ @ DisplayName ("Can identify that empty matrix has no saddle points" )
29
32
public void testCanIdentifyThatEmptyMatrixHasNoSaddlePoints () {
30
33
Matrix matrix = new Matrix (new ArrayList <>());
31
34
@@ -36,6 +39,7 @@ public void testCanIdentifyThatEmptyMatrixHasNoSaddlePoints() {
36
39
37
40
@ Disabled ("Remove to run test" )
38
41
@ Test
42
+ @ DisplayName ("Can identify lack of saddle points when there are none" )
39
43
public void testCanIdentifyLackOfSaddlePointsWhenThereAreNone () {
40
44
Matrix matrix = new Matrix (Arrays .asList (
41
45
Arrays .asList (1 , 2 , 3 ),
@@ -50,6 +54,7 @@ public void testCanIdentifyLackOfSaddlePointsWhenThereAreNone() {
50
54
51
55
@ Disabled ("Remove to run test" )
52
56
@ Test
57
+ @ DisplayName ("Can identify multiple saddle points in a column" )
53
58
public void testCanIdentifyMultipleSaddlePointsInAColumn () {
54
59
Matrix matrix = new Matrix (Arrays .asList (
55
60
Arrays .asList (4 , 5 , 4 ),
@@ -68,6 +73,7 @@ public void testCanIdentifyMultipleSaddlePointsInAColumn() {
68
73
69
74
@ Disabled ("Remove to run test" )
70
75
@ Test
76
+ @ DisplayName ("Can identify multiple saddle points in a Row" )
71
77
public void testCanIdentifyMultipleSaddlePointsInARow () {
72
78
Matrix matrix = new Matrix (Arrays .asList (
73
79
Arrays .asList (6 , 7 , 8 ),
@@ -86,6 +92,7 @@ public void testCanIdentifyMultipleSaddlePointsInARow() {
86
92
87
93
@ Disabled ("Remove to run test" )
88
94
@ Test
95
+ @ DisplayName ("Can identify saddle point in bottom right corner" )
89
96
public void testCanIdentifySaddlePointInBottomRightCorner () {
90
97
Matrix matrix = new Matrix (Arrays .asList (
91
98
Arrays .asList (8 , 7 , 9 ),
@@ -100,6 +107,7 @@ public void testCanIdentifySaddlePointInBottomRightCorner() {
100
107
101
108
@ Disabled ("Remove to run test" )
102
109
@ Test
110
+ @ DisplayName ("Can identify saddle points in a non square matrix" )
103
111
public void testCanIdentifySaddlePointsInANonSquareMatrix () {
104
112
Matrix matrix = new Matrix (Arrays .asList (
105
113
Arrays .asList (3 , 1 , 3 ),
@@ -116,6 +124,7 @@ public void testCanIdentifySaddlePointsInANonSquareMatrix() {
116
124
117
125
@ Disabled ("Remove to run test" )
118
126
@ Test
127
+ @ DisplayName ("Can identify that saddle points in a single column matrix are those with the minimum value" )
119
128
public void testCanIdentifyThatSaddlePointsInASingleColumnMatrixAreThoseWithMinimumValue () {
120
129
Matrix matrix = new Matrix (Arrays .asList (
121
130
Collections .singletonList (2 ),
@@ -134,6 +143,7 @@ public void testCanIdentifyThatSaddlePointsInASingleColumnMatrixAreThoseWithMini
134
143
135
144
@ Disabled ("Remove to run test" )
136
145
@ Test
146
+ @ DisplayName ("Can identify that saddle points in a single row matrix are those with the maximum value" )
137
147
public void testCanIdentifyThatSaddlePointsInASingleRowMatrixAreThoseWithMaximumValue () {
138
148
Matrix matrix = new Matrix (Arrays .asList (
139
149
Arrays .asList (2 , 5 , 3 , 5 )
0 commit comments