|
|
@@ -27,85 +27,85 @@ public final class WordProblemSolverTest {
|
|
27
|
27
|
assertEquals(2, solver.solve("What is 1 plus 1?"));
|
|
28
|
28
|
}
|
|
29
|
29
|
|
|
30
|
|
- @Ignore
|
|
|
30
|
+ @Ignore("Remove to run test")
|
|
31
|
31
|
@Test
|
|
32
|
32
|
public void testSingleAddition2() {
|
|
33
|
33
|
assertEquals(55, solver.solve("What is 53 plus 2?"));
|
|
34
|
34
|
}
|
|
35
|
35
|
|
|
36
|
|
- @Ignore
|
|
|
36
|
+ @Ignore("Remove to run test")
|
|
37
|
37
|
@Test
|
|
38
|
38
|
public void testSingleAdditionWithNegativeNumbers() {
|
|
39
|
39
|
assertEquals(-11, solver.solve("What is -1 plus -10?"));
|
|
40
|
40
|
}
|
|
41
|
41
|
|
|
42
|
|
- @Ignore
|
|
|
42
|
+ @Ignore("Remove to run test")
|
|
43
|
43
|
@Test
|
|
44
|
44
|
public void testSingleAdditionOfLargeNumbers() {
|
|
45
|
45
|
assertEquals(45801, solver.solve("What is 123 plus 45678?"));
|
|
46
|
46
|
}
|
|
47
|
47
|
|
|
48
|
|
- @Ignore
|
|
|
48
|
+ @Ignore("Remove to run test")
|
|
49
|
49
|
@Test
|
|
50
|
50
|
public void testSingleSubtraction() {
|
|
51
|
51
|
assertEquals(16, solver.solve("What is 4 minus -12?"));
|
|
52
|
52
|
}
|
|
53
|
53
|
|
|
54
|
|
- @Ignore
|
|
|
54
|
+ @Ignore("Remove to run test")
|
|
55
|
55
|
@Test
|
|
56
|
56
|
public void testSingleMultiplication() {
|
|
57
|
57
|
assertEquals(-75, solver.solve("What is -3 multiplied by 25?"));
|
|
58
|
58
|
}
|
|
59
|
59
|
|
|
60
|
|
- @Ignore
|
|
|
60
|
+ @Ignore("Remove to run test")
|
|
61
|
61
|
@Test
|
|
62
|
62
|
public void testSingleDivision() {
|
|
63
|
63
|
assertEquals(-11, solver.solve("What is 33 divided by -3?"));
|
|
64
|
64
|
}
|
|
65
|
65
|
|
|
66
|
|
- @Ignore
|
|
|
66
|
+ @Ignore("Remove to run test")
|
|
67
|
67
|
@Test
|
|
68
|
68
|
public void testMultipleAdditions() {
|
|
69
|
69
|
assertEquals(3, solver.solve("What is 1 plus 1 plus 1?"));
|
|
70
|
70
|
}
|
|
71
|
71
|
|
|
72
|
|
- @Ignore
|
|
|
72
|
+ @Ignore("Remove to run test")
|
|
73
|
73
|
@Test
|
|
74
|
74
|
public void testAdditionThenSubtraction() {
|
|
75
|
75
|
assertEquals(8, solver.solve("What is 1 plus 5 minus -2?"));
|
|
76
|
76
|
}
|
|
77
|
77
|
|
|
78
|
|
- @Ignore
|
|
|
78
|
+ @Ignore("Remove to run test")
|
|
79
|
79
|
@Test
|
|
80
|
80
|
public void testMultipleSubtractions() {
|
|
81
|
81
|
assertEquals(3, solver.solve("What is 20 minus 4 minus 13?"));
|
|
82
|
82
|
}
|
|
83
|
83
|
|
|
84
|
|
- @Ignore
|
|
|
84
|
+ @Ignore("Remove to run test")
|
|
85
|
85
|
@Test
|
|
86
|
86
|
public void testSubtractionThenAddition() {
|
|
87
|
87
|
assertEquals(14, solver.solve("What is 17 minus 6 plus 3?"));
|
|
88
|
88
|
}
|
|
89
|
89
|
|
|
90
|
|
- @Ignore
|
|
|
90
|
+ @Ignore("Remove to run test")
|
|
91
|
91
|
@Test
|
|
92
|
92
|
public void testMultipleMultiplications() {
|
|
93
|
93
|
assertEquals(-12, solver.solve("What is 2 multiplied by -2 multiplied by 3?"));
|
|
94
|
94
|
}
|
|
95
|
95
|
|
|
96
|
|
- @Ignore
|
|
|
96
|
+ @Ignore("Remove to run test")
|
|
97
|
97
|
@Test
|
|
98
|
98
|
public void testAdditionThenMultiplication() {
|
|
99
|
99
|
assertEquals(-8, solver.solve("What is -3 plus 7 multiplied by -2?"));
|
|
100
|
100
|
}
|
|
101
|
101
|
|
|
102
|
|
- @Ignore
|
|
|
102
|
+ @Ignore("Remove to run test")
|
|
103
|
103
|
@Test
|
|
104
|
104
|
public void testMultipleDivisions() {
|
|
105
|
105
|
assertEquals(2, solver.solve("What is -12 divided by 2 divided by -3?"));
|
|
106
|
106
|
}
|
|
107
|
107
|
|
|
108
|
|
- @Ignore
|
|
|
108
|
+ @Ignore("Remove to run test")
|
|
109
|
109
|
@Test
|
|
110
|
110
|
public void testUnknownOperation() {
|
|
111
|
111
|
expectedException.expect(IllegalArgumentException.class);
|
|
|
@@ -114,7 +114,7 @@ public final class WordProblemSolverTest {
|
|
114
|
114
|
solver.solve("What is 52 cubed?");
|
|
115
|
115
|
}
|
|
116
|
116
|
|
|
117
|
|
- @Ignore
|
|
|
117
|
+ @Ignore("Remove to run test")
|
|
118
|
118
|
@Test
|
|
119
|
119
|
public void testInvalidQuestionFormat() {
|
|
120
|
120
|
expectedException.expect(IllegalArgumentException.class);
|