forked from cosc442spring2017/FreeCol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDualNumberRuleTest.java
More file actions
118 lines (105 loc) · 2.6 KB
/
DualNumberRuleTest.java
File metadata and controls
118 lines (105 loc) · 2.6 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package net.sf.freecol.common.i18n;
import org.junit.*;
import static org.junit.Assert.*;
/**
* The class <code>DualNumberRuleTest</code> contains tests for the class <code>{@link DualNumberRule}</code>.
*
* @generatedBy CodePro at 5/15/17 8:10 AM
* @author michaeldavies
* @version $Revision: 1.0 $
*/
public class DualNumberRuleTest {
/**
* Run the Number.Category getCategory(double) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:10 AM
*/
@Test
public void testGetCategory_1()
throws Exception {
DualNumberRule fixture = new DualNumberRule();
double input = 1;
Number.Category result = fixture.getCategory(input);
// add additional test code here
assertNotNull(result);
assertEquals("one", result.name());
assertEquals("one", result.toString());
assertEquals(1, result.ordinal());
}
/**
* Run the Number.Category getCategory(double) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:10 AM
*/
@Test
public void testGetCategory_2()
throws Exception {
DualNumberRule fixture = new DualNumberRule();
double input = 2;
Number.Category result = fixture.getCategory(input);
// add additional test code here
assertNotNull(result);
assertEquals("two", result.name());
assertEquals("two", result.toString());
assertEquals(2, result.ordinal());
}
/**
* Run the Number.Category getCategory(double) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:10 AM
*/
@Test
public void testGetCategory_3()
throws Exception {
DualNumberRule fixture = new DualNumberRule();
double input = 5;
Number.Category result = fixture.getCategory(input);
// add additional test code here
assertNotNull(result);
assertEquals("other", result.name());
assertEquals("other", result.toString());
assertEquals(5, result.ordinal());
}
/**
* Perform pre-test initialization.
*
* @throws Exception
* if the initialization fails for some reason
*
* @generatedBy CodePro at 5/15/17 8:10 AM
*/
@Before
public void setUp()
throws Exception {
// add additional set up code here
}
/**
* Perform post-test clean-up.
*
* @throws Exception
* if the clean-up fails for some reason
*
* @generatedBy CodePro at 5/15/17 8:10 AM
*/
@After
public void tearDown()
throws Exception {
// Add additional tear down code here
}
/**
* Launch the test.
*
* @param args the command line arguments
*
* @generatedBy CodePro at 5/15/17 8:10 AM
*/
public static void main(String[] args) {
new org.junit.runner.JUnitCore().run(DualNumberRuleTest.class);
}
}