1   package de.fu_berlin.ties.extract;
2   
3   import junit.framework.TestCase;
4   // JUnitDoclet begin import
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   // JUnitDoclet end import
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  // JUnitDoclet begin extends_implements
21  extends TestCase
22  // JUnitDoclet end extends_implements
23  {
24    // JUnitDoclet begin class
25    Extraction extraction = null;
26    // JUnitDoclet end class
27    
28    public ExtractionTest(String name) {
29      // JUnitDoclet begin method ExtractionTest
30      super(name);
31      // JUnitDoclet end method ExtractionTest
32    }
33    
34    public de.fu_berlin.ties.extract.Extraction createInstance() throws Exception {
35      // JUnitDoclet begin method testcase.createInstance
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      // JUnitDoclet end method testcase.createInstance
41    }
42    
43    protected void setUp() throws Exception {
44      // JUnitDoclet begin method testcase.setUp
45      super.setUp();
46      extraction = createInstance();
47      // JUnitDoclet end method testcase.setUp
48    }
49    
50    protected void tearDown() throws Exception {
51      // JUnitDoclet begin method testcase.tearDown
52      extraction = null;
53      super.tearDown();
54      // JUnitDoclet end method testcase.tearDown
55    }
56    
57    public void testAddToken() throws Exception {
58      // JUnitDoclet begin method addToken
59      // JUnitDoclet end method addToken
60    }
61    
62    public void testClone() throws Exception {
63      // JUnitDoclet begin method clone
64      // JUnitDoclet end method clone
65    }
66    
67    public void testEquals() throws Exception {
68      // JUnitDoclet begin method equals
69      // JUnitDoclet end method equals
70    }
71    
72    public void testGetText() throws Exception {
73      // JUnitDoclet begin method getText
74      // JUnitDoclet end method getText
75    }
76    
77    public void testGetVisibleChars() throws Exception {
78      // JUnitDoclet begin method getVisibleChars
79      // JUnitDoclet end method getVisibleChars
80    }
81    
82    public void testHashCode() throws Exception {
83      // JUnitDoclet begin method hashCode
84      // JUnitDoclet end method hashCode
85    }
86    
87    public void testHasProperty() throws Exception {
88      // JUnitDoclet begin method hasProperty
89      // JUnitDoclet end method hasProperty
90    }
91    
92    public void testSetProperty() throws Exception {
93      // JUnitDoclet begin method setProperty
94      // JUnitDoclet end method setProperty
95    }
96    
97    public void testUnsetProperty() throws Exception {
98      // JUnitDoclet begin method unsetProperty
99      // JUnitDoclet end method unsetProperty
100   }
101   
102   public void testModifyProbability() throws Exception {
103     // JUnitDoclet begin method modifyProbability
104     // JUnitDoclet end method modifyProbability
105   }
106   
107   public void testSetGetFirstTokenRep() throws Exception {
108     // JUnitDoclet begin method setFirstTokenRep getFirstTokenRep
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     // JUnitDoclet end method setFirstTokenRep getFirstTokenRep
116   }
117   
118   public void testSetIsFirstTokenRepIgnored() throws Exception {
119     // JUnitDoclet begin method setFirstTokenRepIgnored isFirstTokenRepIgnored
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     // JUnitDoclet end method setFirstTokenRepIgnored isFirstTokenRepIgnored
127   }
128   
129   public void testSetGetIndex() throws Exception {
130     // JUnitDoclet begin method setIndex getIndex
131     // this only works for non-negative values, otherwise the implicitly stored
132     // value is used
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     // JUnitDoclet end method setIndex getIndex
140   }
141   
142   public void testSetGetLastIndex() throws Exception {
143     // JUnitDoclet begin method setLastIndex getLastIndex
144       // this only works for non-negative values, otherwise the implicitly stored
145       // value is used
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     // JUnitDoclet end method setLastIndex getLastIndex
153   }
154   
155   public void testSetIsSealed() throws Exception {
156     // JUnitDoclet begin method setSealed isSealed
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     // JUnitDoclet end method setSealed isSealed
164   }
165   
166   public void testStoreFields() throws Exception {
167     // JUnitDoclet begin method storeFields
168     // JUnitDoclet end method storeFields
169   }
170   
171   public void testTokenCount() throws Exception {
172     // JUnitDoclet begin method tokenCount
173     // JUnitDoclet end method tokenCount
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     // JUnitDoclet begin method testcase.testVault
186     // JUnitDoclet end method testcase.testVault
187   }
188   
189   public static void main(String[] args) {
190     // JUnitDoclet begin method testcase.main
191     junit.textui.TestRunner.run(ExtractionTest.class);
192     // JUnitDoclet end method testcase.main
193   }
194 }