forked from cosc442spring2017/FreeCol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaultNumberRuleTest.java
More file actions
161 lines (140 loc) · 3.35 KB
/
DefaultNumberRuleTest.java
File metadata and controls
161 lines (140 loc) · 3.35 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
package net.sf.freecol.common.i18n;
import org.junit.*;
import static org.junit.Assert.*;
/**
* The class <code>DefaultNumberRuleTest</code> contains tests for the class <code>{@link DefaultNumberRule}</code>.
*
* @generatedBy CodePro at 5/15/17 8:35 AM
* @author michaeldavies
* @version $Revision: 1.0 $
*/
public class DefaultNumberRuleTest {
/**
* Run the DefaultNumberRule() constructor test.
*
* @generatedBy CodePro at 5/15/17 8:35 AM
*/
@Test
public void testDefaultNumberRule_1()
throws Exception {
DefaultNumberRule result = new DefaultNumberRule();
assertNotNull(result);
// add additional test code here
}
/**
* Run the void addRule(Category,String) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:35 AM
*/
@Test
public void testAddRule_1()
throws Exception {
DefaultNumberRule fixture = new DefaultNumberRule();
Number.Category number = Number.Category.two;
String input = "Test";
fixture.addRule(number, input);
}
/**
* Run the void addRule(Category,Rule) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:35 AM
*/
@Test
public void testAddRule_2()
throws Exception {
DefaultNumberRule fixture = new DefaultNumberRule();
Number.Category number = Number.Category.one;
Rule rule = new Rule("Test");
fixture.addRule(number, rule);
}
/**
* Run the int countRules() method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:35 AM
*/
@Test
public void testCountRules_1()
throws Exception {
DefaultNumberRule fixture = new DefaultNumberRule();
int result = fixture.countRules();
// add additional test code here
assertEquals(0, result);
}
/**
* Run the Number.Category getCategory(double) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:35 AM
*/
@Test
public void testGetCategory_1()
throws Exception {
DefaultNumberRule fixture = new DefaultNumberRule();
double input = 1.0;
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());
}
/**
* Run the Rule getRule(Category) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/15/17 8:35 AM
*/
@Test
public void testGetRule_1()
throws Exception {
DefaultNumberRule fixture = new DefaultNumberRule();
Number.Category category = Number.Category.few;
Rule result = fixture.getRule(category);
// add additional test code here
assertEquals(null, result);
}
/**
* Perform pre-test initialization.
*
* @throws Exception
* if the initialization fails for some reason
*
* @generatedBy CodePro at 5/15/17 8:35 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:35 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:35 AM
*/
public static void main(String[] args) {
new org.junit.runner.JUnitCore().run(DefaultNumberRuleTest.class);
}
}