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 testAsByte() throws Exception {
63      // JUnitDoclet begin method asByte
64      // JUnitDoclet end method asByte
65    }
66    
67    public void testAsChar() throws Exception {
68      // JUnitDoclet begin method asChar
69      // JUnitDoclet end method asChar
70    }
71    
72    public void testAsDouble() throws Exception {
73      // JUnitDoclet begin method asDouble
74      // JUnitDoclet end method asDouble
75    }
76    
77    public void testAsFloat() throws Exception {
78      // JUnitDoclet begin method asFloat
79      // JUnitDoclet end method asFloat
80    }
81    
82    public void testAsInt() throws Exception {
83      // JUnitDoclet begin method asInt
84      // JUnitDoclet end method asInt
85    }
86    
87    public void testAsLong() throws Exception {
88      // JUnitDoclet begin method asLong
89      // JUnitDoclet end method asLong
90    }
91    
92    public void testAsShort() throws Exception {
93      // JUnitDoclet begin method asShort
94      // JUnitDoclet end method asShort
95    }
96    
97    public void testAsString() throws Exception {
98      // JUnitDoclet begin method asString
99      // JUnitDoclet end method asString
100   }
101   
102   public void testConfigureLog() throws Exception {
103     // JUnitDoclet begin method configureLog
104     // JUnitDoclet end method configureLog
105   }
106   
107   public void testCreateObject() throws Exception {
108     // JUnitDoclet begin method createObject
109     // JUnitDoclet end method createObject
110   }
111   
112   public void testFormatDurationInMillisecs() throws Exception {
113     // JUnitDoclet begin method formatDurationInMillisecs
114     final int msInSec = 1000;
115     final int msInMin = msInSec * 60;
116     final int msInHour = msInMin * 60;
117     final int msInDay = msInHour * 24;
118 
119     assertEquals(Util.formatDurationInMillisecs(2 * msInDay + 3 * msInHour
120         + 2 * msInMin + 43 * msInSec + 666), "2D+03:02:43.666");
121     assertEquals(Util.formatDurationInMillisecs(1 * msInHour), "01:00:00");
122     assertEquals(Util.formatDurationInMillisecs(1 * msInDay), "1D");
123     assertEquals(Util.formatDurationInMillisecs(5 * msInMin + 123),
124         "00:05:00.123");
125     assertEquals(Util.formatDurationInMillisecs(1 * msInDay + 4 * msInHour
126         + 19 * msInMin + 3 * msInSec), "1D+04:19:03");
127     assertEquals(Util.formatDurationInMillisecs(0), "00:00:00");
128     // JUnitDoclet end method formatDurationInMillisecs
129   }
130   
131   public void testFormatDurationInSeconds() throws Exception {
132     // JUnitDoclet begin method formatDurationInSeconds
133     // JUnitDoclet end method formatDurationInSeconds
134   }
135   
136   public void testEnsureNonNegative() throws Exception {
137     // JUnitDoclet begin method ensureNonNegative
138     // JUnitDoclet end method ensureNonNegative
139   }
140   
141   public void testFormat() throws Exception {
142     // JUnitDoclet begin method format
143     // JUnitDoclet end method format
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   
157   
158   /***
159   * JUnitDoclet moves marker to this method, if there is not match
160   * for them in the regenerated code and if the marker is not empty.
161   * This way, no test gets lost when regenerating after renaming.
162   * Method testVault is supposed to be empty.
163   */
164   public void testVault() throws Exception {
165     // JUnitDoclet begin method testcase.testVault
166     // JUnitDoclet end method testcase.testVault
167   }
168   
169   public static void main(String[] args) {
170     // JUnitDoclet begin method testcase.main
171     junit.textui.TestRunner.run(UtilTest.class);
172     // JUnitDoclet end method testcase.main
173   }
174 }