1 package de.fu_berlin.ties.util;
2
3 import junit.framework.TestCase;
4
5 import de.fu_berlin.ties.util.Util;
6
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
19 extends TestCase
20
21 {
22
23 Util utilities = null;
24
25
26 public UtilTest(String name) {
27
28 super(name);
29
30 }
31
32 public de.fu_berlin.ties.util.Util createInstance() throws Exception {
33
34 return null;
35
36 }
37
38 protected void setUp() throws Exception {
39
40 super.setUp();
41 utilities = createInstance();
42
43 }
44
45 protected void tearDown() throws Exception {
46
47 utilities = null;
48 super.tearDown();
49
50 }
51
52 public void testAppendPositiveNumber() throws Exception {
53
54
55 }
56
57 public void testAsBoolean() throws Exception {
58
59
60 }
61
62 public void testAsByte() throws Exception {
63
64
65 }
66
67 public void testAsChar() throws Exception {
68
69
70 }
71
72 public void testAsDouble() throws Exception {
73
74
75 }
76
77 public void testAsFloat() throws Exception {
78
79
80 }
81
82 public void testAsInt() throws Exception {
83
84
85 }
86
87 public void testAsLong() throws Exception {
88
89
90 }
91
92 public void testAsShort() throws Exception {
93
94
95 }
96
97 public void testAsString() throws Exception {
98
99
100 }
101
102 public void testConfigureLog() throws Exception {
103
104
105 }
106
107 public void testCreateObject() throws Exception {
108
109
110 }
111
112 public void testFormatDurationInMillisecs() throws Exception {
113
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
129 }
130
131 public void testFormatDurationInSeconds() throws Exception {
132
133
134 }
135
136 public void testEnsureNonNegative() throws Exception {
137
138
139 }
140
141 public void testFormat() throws Exception {
142
143
144 }
145
146 public void testReproducibleRandom() throws Exception {
147
148
149 }
150
151 public void testShowDuration() throws Exception {
152
153
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
166
167 }
168
169 public static void main(String[] args) {
170
171 junit.textui.TestRunner.run(UtilTest.class);
172
173 }
174 }