1   package de.fu_berlin.ties.util;
2   
3   import junit.framework.TestCase;
4   // JUnitDoclet begin import
5   import de.fu_berlin.ties.util.Util;
6   // JUnitDoclet end import
7   
8   /***
9   * Generated by JUnitDoclet, a tool provided by
10  * ObjectFab GmbH under LGPL.
11  * Please see www.junitdoclet.org, www.gnu.org
12  * and www.objectfab.de for informations about
13  * the tool, the licence and the authors.
14  */
15  
16  
17  public class UtilTest
18  // JUnitDoclet begin extends_implements
19  extends TestCase
20  // JUnitDoclet end extends_implements
21  {
22    // JUnitDoclet begin class
23    Util utilities = null;
24    // JUnitDoclet end class
25    
26    public UtilTest(String name) {
27      // JUnitDoclet begin method UtilTest
28      super(name);
29      // JUnitDoclet end method UtilTest
30    }
31    
32    public de.fu_berlin.ties.util.Util createInstance() throws Exception {
33      // JUnitDoclet begin method testcase.createInstance
34      return null;    // static class
35      // JUnitDoclet end method testcase.createInstance
36    }
37    
38    protected void setUp() throws Exception {
39      // JUnitDoclet begin method testcase.setUp
40      super.setUp();
41      utilities = createInstance();
42      // JUnitDoclet end method testcase.setUp
43    }
44    
45    protected void tearDown() throws Exception {
46      // JUnitDoclet begin method testcase.tearDown
47      utilities = null;
48      super.tearDown();
49      // JUnitDoclet end method testcase.tearDown
50    }
51    
52    public void testAppendPositiveNumber() throws Exception {
53      // JUnitDoclet begin method appendPositiveNumber
54      // JUnitDoclet end method appendPositiveNumber
55    }
56    
57    public void testAsBoolean() throws Exception {
58      // JUnitDoclet begin method asBoolean
59      // JUnitDoclet end method asBoolean
60    }
61    
62    public void testAsChar() throws Exception {
63      // JUnitDoclet begin method asChar
64      // JUnitDoclet end method asChar
65    }
66    
67    public void testAsDouble() throws Exception {
68      // JUnitDoclet begin method asDouble
69      // JUnitDoclet end method asDouble
70    }
71    
72    public void testAsFloat() throws Exception {
73      // JUnitDoclet begin method asFloat
74      // JUnitDoclet end method asFloat
75    }
76    
77    public void testAsInt() throws Exception {
78      // JUnitDoclet begin method asInt
79      // JUnitDoclet end method asInt
80    }
81    
82    public void testAsLong() throws Exception {
83      // JUnitDoclet begin method asLong
84      // JUnitDoclet end method asLong
85    }
86    
87    public void testAsShort() throws Exception {
88      // JUnitDoclet begin method asShort
89      // JUnitDoclet end method asShort
90    }
91    
92    public void testAsString() throws Exception {
93      // JUnitDoclet begin method asString
94      // JUnitDoclet end method asString
95    }
96    
97    public void testConfigureLog() throws Exception {
98      // JUnitDoclet begin method configureLog
99      // JUnitDoclet end method configureLog
100   }
101   
102   public void testCreateObject() throws Exception {
103     // JUnitDoclet begin method createObject
104     // JUnitDoclet end method createObject
105   }
106   
107   public void testFormatDurationInMillisecs() throws Exception {
108     // JUnitDoclet begin method formatDurationInMillisecs
109     final int msInSec = 1000;
110     final int msInMin = msInSec * 60;
111     final int msInHour = msInMin * 60;
112     final int msInDay = msInHour * 24;
113 
114     assertEquals(Util.formatDurationInMillisecs(2 * msInDay + 3 * msInHour
115         + 2 * msInMin + 43 * msInSec + 666), "2D+03:02:43.666");
116     assertEquals(Util.formatDurationInMillisecs(1 * msInHour), "01:00:00");
117     assertEquals(Util.formatDurationInMillisecs(1 * msInDay), "1D");
118     assertEquals(Util.formatDurationInMillisecs(5 * msInMin + 123),
119         "00:05:00.123");
120     assertEquals(Util.formatDurationInMillisecs(1 * msInDay + 4 * msInHour
121         + 19 * msInMin + 3 * msInSec), "1D+04:19:03");
122     assertEquals(Util.formatDurationInMillisecs(0), "00:00:00");
123     // JUnitDoclet end method formatDurationInMillisecs
124   }
125   
126   public void testFormatDurationInSeconds() throws Exception {
127     // JUnitDoclet begin method formatDurationInSeconds
128     // JUnitDoclet end method formatDurationInSeconds
129   }
130   
131   public void testEnsureNonNegative() throws Exception {
132     // JUnitDoclet begin method ensureNonNegative
133     // JUnitDoclet end method ensureNonNegative
134   }
135   
136   public void testFormat() throws Exception {
137     // JUnitDoclet begin method format
138     // JUnitDoclet end method format
139   }
140   
141   public void testLongHash() throws Exception {
142     // JUnitDoclet begin method longHash
143     // JUnitDoclet end method longHash
144   }
145   
146   public void testReproducibleRandom() throws Exception {
147     // JUnitDoclet begin method reproducibleRandom
148     // JUnitDoclet end method reproducibleRandom
149   }
150   
151   public void testShowDuration() throws Exception {
152     // JUnitDoclet begin method showDuration
153     // JUnitDoclet end method showDuration
154   }
155   
156   public void testToChar() throws Exception {
157     // JUnitDoclet begin method toChar
158     // JUnitDoclet end method toChar
159   }
160   
161   
162   
163   /***
164   * JUnitDoclet moves marker to this method, if there is not match
165   * for them in the regenerated code and if the marker is not empty.
166   * This way, no test gets lost when regenerating after renaming.
167   * Method testVault is supposed to be empty.
168   */
169   public void testVault() throws Exception {
170     // JUnitDoclet begin method testcase.testVault
171     // JUnitDoclet end method testcase.testVault
172   }
173   
174   public static void main(String[] args) {
175     // JUnitDoclet begin method testcase.main
176     junit.textui.TestRunner.run(UtilTest.class);
177     // JUnitDoclet end method testcase.main
178   }
179 }