forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_239Test.java
42 lines (35 loc) · 887 Bytes
/
_239Test.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
38
39
40
41
42
package com.fishercoder;
import com.fishercoder.solutions._239;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* Created by fishercoder on 1/10/17.
*/
public class _239Test {
private static _239 test;
private static int[] expected;
private static int[] actual;
private static int[] nums;
private static int k;
@BeforeClass
public static void setup(){
test = new _239();
}
@Before
public void setupForEachTest(){
expected = new int[]{};
actual = new int[]{};
nums = new int[]{};
k = 0;
}
@Test
public void test1(){
nums = new int[]{1,3,-1,-3,5,3,6,7};
k = 3;
expected = new int[]{3,3,5,5,6,7};
actual = test.maxSlidingWindow(nums, k);
Assert.assertArrayEquals(expected, actual);
}
}