1 package de.fu_berlin.ties.extract;
2
3 import junit.framework.TestCase;
4
5 import de.fu_berlin.ties.classify.Probability;
6 import de.fu_berlin.ties.extract.Extraction;
7 import de.fu_berlin.ties.text.TokenDetails;
8
9
10 /***
11 * Generated by JUnitDoclet, a tool provided by
12 * ObjectFab GmbH under LGPL.
13 * Please see www.junitdoclet.org, www.gnu.org
14 * and www.objectfab.de for informations about
15 * the tool, the licence and the authors.
16 */
17
18
19 public class ExtractionTest
20
21 extends TestCase
22
23 {
24
25 Extraction extraction = null;
26
27
28 public ExtractionTest(String name) {
29
30 super(name);
31
32 }
33
34 public de.fu_berlin.ties.extract.Extraction createInstance() throws Exception {
35
36 final TokenDetails details =
37 new TokenDetails("Dr. Weizenbaum", 2, 547, true);
38 final Probability prob = new Probability(0.89, 0.683);
39 return new Extraction("speaker", details, prob);
40
41 }
42
43 protected void setUp() throws Exception {
44
45 super.setUp();
46 extraction = createInstance();
47
48 }
49
50 protected void tearDown() throws Exception {
51
52 extraction = null;
53 super.tearDown();
54
55 }
56
57 public void testAddToken() throws Exception {
58
59
60 }
61
62 public void testClone() throws Exception {
63
64
65 }
66
67 public void testEquals() throws Exception {
68
69
70 }
71
72 public void testGetText() throws Exception {
73
74
75 }
76
77 public void testGetVisibleChars() throws Exception {
78
79
80 }
81
82 public void testHashCode() throws Exception {
83
84
85 }
86
87 public void testHasProperty() throws Exception {
88
89
90 }
91
92 public void testSetProperty() throws Exception {
93
94
95 }
96
97 public void testUnsetProperty() throws Exception {
98
99
100 }
101
102 public void testModifyProbability() throws Exception {
103
104
105 }
106
107 public void testSetGetFirstTokenRep() throws Exception {
108
109 int[] tests = {Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE};
110
111 for (int i = 0; i < tests.length; i++) {
112 extraction.setFirstTokenRep(tests[i]);
113 assertEquals(tests[i], extraction.getFirstTokenRep());
114 }
115
116 }
117
118 public void testSetIsFirstTokenRepIgnored() throws Exception {
119
120 boolean[] tests = {true, false};
121
122 for (int i = 0; i < tests.length; i++) {
123 extraction.setFirstTokenRepIgnored(tests[i]);
124 assertEquals(tests[i], extraction.isFirstTokenRepIgnored());
125 }
126
127 }
128
129 public void testSetGetIndex() throws Exception {
130
131
132
133 int[] tests = {0, 1, 2, Integer.MAX_VALUE};
134
135 for (int i = 0; i < tests.length; i++) {
136 extraction.setIndex(tests[i]);
137 assertEquals(tests[i], extraction.getIndex());
138 }
139
140 }
141
142 public void testSetGetLastIndex() throws Exception {
143
144
145
146 int[] tests = {0, 1, 2, Integer.MAX_VALUE};
147
148 for (int i = 0; i < tests.length; i++) {
149 extraction.setLastIndex(tests[i]);
150 assertEquals(tests[i], extraction.getLastIndex());
151 }
152
153 }
154
155 public void testSetIsSealed() throws Exception {
156
157 boolean[] tests = {true, false};
158
159 for (int i = 0; i < tests.length; i++) {
160 extraction.setSealed(tests[i]);
161 assertEquals(tests[i], extraction.isSealed());
162 }
163
164 }
165
166 public void testStoreFields() throws Exception {
167
168
169 }
170
171 public void testTokenCount() throws Exception {
172
173
174 }
175
176
177
178 /***
179 * JUnitDoclet moves marker to this method, if there is not match
180 * for them in the regenerated code and if the marker is not empty.
181 * This way, no test gets lost when regenerating after renaming.
182 * Method testVault is supposed to be empty.
183 */
184 public void testVault() throws Exception {
185
186
187 }
188
189 public static void main(String[] args) {
190
191 junit.textui.TestRunner.run(ExtractionTest.class);
192
193 }
194 }