Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathSumOfInputTest.java
More file actions
Latest commit
57 lines (46 loc) · 1.19 KB
/
Copy pathSumOfInputTest.java
File metadata and controls
57 lines (46 loc) · 1.19 KB
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
importstaticorg.junit.Assert.*;
importorg.junit.After;
importorg.junit.Before;
importorg.junit.Test;
/**
* The test class SumOfInputTest.
*
* @author (your name)
* @version (a version number or a date)
*/
publicclassSumOfInputTest
{
/**
* Default constructor for test class SumOfInputTest
*/
//Bonus Question! How is this constructor used when none is defined
//in the class?
publicSumOfInputTest()
{
}
@Before
publicvoidsetUp()
{
}
@After
publicvoidtearDown()
{
}
@Test
publicvoidtest1(){
SumOfInputtestSum = newSumOfInput();
assertEquals(Integer.valueOf(3), testSum.oneToNumber(2));
}
@Test
publicvoidtest2(){
SumOfInputtestSum = newSumOfInput();
assertEquals(Integer.valueOf(4465), testSum.oneToNumber(94));
assertEquals(Integer.valueOf(171), testSum.oneToNumber(18));
}
@Test
publicvoidtest3(){
SumOfInputtestSum = newSumOfInput();
assertNotEquals(Integer.valueOf(9000), testSum.oneToNumber(42));
assertNotEquals(Integer.valueOf(99999999), testSum.oneToNumber(2425804));
}
}