forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_415Test.java
70 lines (55 loc) · 1.34 KB
/
_415Test.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package com.fishercoder;
import com.fishercoder.solutions._415;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static junit.framework.Assert.assertEquals;
/**
* Created by fishercoder on 1/8/17.
*/
public class _415Test {
private static _415 test;
private static String expected;
private static String actual;
private static String num1;
private static String num2;
@BeforeClass
public static void setup() {
test = new _415();
expected = new String();
actual = new String();
num1 = new String();
num2 = new String();
}
@Before
public void setupForEachTest() {
expected = "";
actual = "";
num1 = "";
num2 = "";
}
@Test
public void test1() {
num1 = "123";
num2 = "34567";
expected = "34690";
actual = test.addStrings(num1, num2);
assertEquals(expected, actual);
}
@Test
public void test2() {
num1 = "1";
num2 = "9";
expected = "10";
actual = test.addStrings(num1, num2);
assertEquals(expected, actual);
}
@Test
public void test3() {
num1 = "9";
num2 = "99";
expected = "108";
actual = test.addStrings(num1, num2);
assertEquals(expected, actual);
}
}