Skip to content

Commit d677c9f

Browse files
committed
matrix, meetup, micro-blog
1 parent 84c050c commit d677c9f

3 files changed

Lines changed: 118 additions & 0 deletions

File tree

exercises/practice/matrix/src/test/java/MatrixTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import org.junit.jupiter.api.Disabled;
2+
import org.junit.jupiter.api.DisplayName;
23
import org.junit.jupiter.api.Test;
34

45
import static org.assertj.core.api.Assertions.assertThat;
56

67
public class MatrixTest {
78

89
@Test
10+
@DisplayName("extract row from one number matrix")
911
public void extractRowFromOneNumberMatrixTest() {
1012
String matrixAsString = "1";
1113
int rowIndex = 1;
@@ -18,6 +20,7 @@ public void extractRowFromOneNumberMatrixTest() {
1820

1921
@Disabled("Remove to run test")
2022
@Test
23+
@DisplayName("can extract row")
2124
public void extractRowFromMatrixTest() {
2225
String matrixAsString = "1 2\n3 4";
2326
int rowIndex = 2;
@@ -30,6 +33,7 @@ public void extractRowFromMatrixTest() {
3033

3134
@Disabled("Remove to run test")
3235
@Test
36+
@DisplayName("extract row where numbers have different widths")
3337
public void extractRowFromDiffWidthsMatrixTest() {
3438
String matrixAsString = "1 2\n10 20";
3539
int rowIndex = 2;
@@ -42,6 +46,7 @@ public void extractRowFromDiffWidthsMatrixTest() {
4246

4347
@Disabled("Remove to run test")
4448
@Test
49+
@DisplayName("can extract row from non-square matrix with no corresponding column")
4550
public void extractRowFromNonSquareMatrixTest() {
4651
String matrixAsString = "1 2 3\n4 5 6\n7 8 9\n8 7 6";
4752
int rowIndex = 4;
@@ -54,6 +59,7 @@ public void extractRowFromNonSquareMatrixTest() {
5459

5560
@Disabled("Remove to run test")
5661
@Test
62+
@DisplayName("extract column from one number matrix")
5763
public void extractColumnFromOneNumberMatrixTest() {
5864
String matrixAsString = "1";
5965
int columnIndex = 1;
@@ -66,6 +72,7 @@ public void extractColumnFromOneNumberMatrixTest() {
6672

6773
@Disabled("Remove to run test")
6874
@Test
75+
@DisplayName("can extract column")
6976
public void extractColumnMatrixTest() {
7077
String matrixAsString = "1 2 3\n4 5 6\n7 8 9";
7178
int columnIndex = 3;
@@ -78,6 +85,7 @@ public void extractColumnMatrixTest() {
7885

7986
@Disabled("Remove to run test")
8087
@Test
88+
@DisplayName("can extract column from non-square matrix with no corresponding row")
8189
public void extractColumnFromNonSquareMatrixTest() {
8290
String matrixAsString = "1 2 3 4\n5 6 7 8\n9 8 7 6";
8391
int columnIndex = 4;
@@ -90,6 +98,7 @@ public void extractColumnFromNonSquareMatrixTest() {
9098

9199
@Disabled("Remove to run test")
92100
@Test
101+
@DisplayName("extract column where numbers have different widths")
93102
public void extractColumnFromDiffWidthsMatrixTest() {
94103
String matrixAsString = "89 1903 3\n18 3 1\n9 4 800";
95104
int columnIndex = 2;

0 commit comments

Comments
 (0)