Skip to content

Commit 8ab574c

Browse files
committedSep 6, 2018
add test for 896
1 parent 5bd2526 commit 8ab574c

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed
 

‎src/main/java/com/fishercoder/solutions/_896.java

-7
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,4 @@ public boolean isMonotonic(int[] A) {
6262
return i == A.length - 1;
6363
}
6464
}
65-
66-
public static void main(String... args) {
67-
int[] A = new int[]{1, 3, 2};
68-
Solution1 solution1 = new Solution1();
69-
System.out.println(solution1.isMonotonic(A));
70-
}
71-
7265
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._896;
4+
import org.junit.BeforeClass;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertEquals;
8+
9+
public class _896Test {
10+
private static _896.Solution1 solution1;
11+
private static int[] A;
12+
13+
@BeforeClass
14+
public static void setup() {
15+
solution1 = new _896.Solution1();
16+
}
17+
18+
@Test
19+
public void test1() {
20+
A = new int[]{1, 3, 2};
21+
assertEquals(false, solution1.isMonotonic(A));
22+
}
23+
24+
}

0 commit comments

Comments
 (0)
Please sign in to comment.