1 package net.sf.mbus4j.decoder;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 import java.util.Date;
31 import org.junit.After;
32 import org.junit.AfterClass;
33 import org.junit.Before;
34 import org.junit.BeforeClass;
35 import org.junit.Ignore;
36 import org.junit.Test;
37 import static org.junit.Assert.*;
38
39
40
41
42
43 public class StackTest {
44
45 public StackTest() {
46 }
47
48 @BeforeClass
49 public static void setUpClass() throws Exception {
50 }
51
52 @AfterClass
53 public static void tearDownClass() throws Exception {
54 }
55
56 private Stack stack;
57
58 @Before
59 public void setUp() {
60 stack = new Stack();
61 }
62
63 @After
64 public void tearDown() {
65 stack = null;
66 }
67
68
69
70
71 @Test
72 @Ignore
73 public void testPeekIsTimestampRes1() {
74 System.out.println("peekIsTimestampRes1");
75 Stack instance = new Stack();
76 boolean expResult = false;
77 boolean result = instance.peekIsTimestampRes1();
78 assertEquals(expResult, result);
79
80 fail("The test case is a prototype.");
81 }
82
83
84
85
86 @Test
87 @Ignore
88 public void testPeekIsTimestampRes2() {
89 System.out.println("peekIsTimestampRes2");
90 Stack instance = new Stack();
91 boolean expResult = false;
92 boolean result = instance.peekIsTimestampRes2();
93 assertEquals(expResult, result);
94
95 fail("The test case is a prototype.");
96 }
97
98
99
100
101 @Test
102 @Ignore
103 public void testPeekIsTimestampRes3() {
104 System.out.println("peekIsTimestampRes3");
105 Stack instance = new Stack();
106 boolean expResult = false;
107 boolean result = instance.peekIsTimestampRes3();
108 assertEquals(expResult, result);
109
110 fail("The test case is a prototype.");
111 }
112
113
114
115
116 @Test
117 @Ignore
118 public void testPeekIsTimestampSummertime() {
119 System.out.println("peekIsTimestampSummertime");
120 Stack instance = new Stack();
121 boolean expResult = false;
122 boolean result = instance.peekIsTimestampSummertime();
123 assertEquals(expResult, result);
124
125 fail("The test case is a prototype.");
126 }
127
128
129
130
131 @Test
132 @Ignore
133 public void testPeekIsTimestampValid() {
134 System.out.println("peekIsTimestampValid");
135 Stack instance = new Stack();
136 boolean expResult = false;
137 boolean result = instance.peekIsTimestampValid();
138 assertEquals(expResult, result);
139
140 fail("The test case is a prototype.");
141 }
142
143
144
145
146 @Test
147 public void testPopBcdByte() {
148 System.out.println("popBcdByte");
149 stack.init(1);
150 stack.push((byte) 0xF9);
151 assertNull(stack.peekBcdError(2));
152 assertEquals(-9, stack.popBcdByte());
153 }
154
155
156
157
158 @Test
159 public void testPeekBcdError() {
160 System.out.println("peekBcdError");
161 stack.init(4);
162 stack.push((byte) 0xA9);
163 stack.push((byte) 0xCB);
164 stack.push((byte) 0xED);
165 stack.push((byte) 0xFF);
166 assertEquals("--E CbA9", stack.peekBcdError(8));
167 stack.init(1);
168 stack.push((byte) 0xFF);
169 assertEquals("--", stack.peekBcdError(2));
170 }
171
172
173
174
175 @Test
176 @Ignore
177 public void testPopBcdInteger() {
178 System.out.println("popBcdInteger");
179 int digits = 0;
180 Stack instance = new Stack();
181 int expResult = 0;
182 int result = instance.popBcdInteger(digits);
183 assertEquals(expResult, result);
184
185 fail("The test case is a prototype.");
186 }
187
188
189
190
191 @Test
192 @Ignore
193 public void testPopBcdShort() {
194 System.out.println("popBcdShort");
195 int digits = 0;
196 Stack instance = new Stack();
197 short expResult = 0;
198 short result = instance.popBcdShort(digits);
199 assertEquals(expResult, result);
200
201 fail("The test case is a prototype.");
202 }
203
204
205
206
207 @Test
208 @Ignore
209 public void testPopBcdLong() {
210 System.out.println("popBcdLong");
211 int digits = 0;
212 Stack instance = new Stack();
213 long expResult = 0L;
214 long result = instance.popBcdLong(digits);
215 assertEquals(expResult, result);
216
217 fail("The test case is a prototype.");
218 }
219
220
221
222
223 @Test
224 @Ignore
225 public void testPopByte() {
226 System.out.println("popByte");
227 Stack instance = new Stack();
228 byte expResult = 0;
229 byte result = instance.popByte();
230 assertEquals(expResult, result);
231
232 fail("The test case is a prototype.");
233 }
234
235
236
237
238 @Test
239 @Ignore
240 public void testPopBytes() {
241 System.out.println("popBytes");
242 Stack instance = new Stack();
243 byte[] expResult = null;
244 byte[] result = instance.popBytes();
245 assertEquals(expResult, result);
246
247 fail("The test case is a prototype.");
248 }
249
250
251
252
253 @Test
254 @Ignore
255 public void testPopDate() {
256 System.out.println("popDate");
257 Stack instance = new Stack();
258 Date expResult = null;
259 Date result = instance.popDate();
260 assertEquals(expResult, result);
261
262 fail("The test case is a prototype.");
263 }
264
265
266
267
268 @Test
269 @Ignore
270 public void testPopFloat() {
271 System.out.println("popFloat");
272 Stack instance = new Stack();
273 float expResult = 0.0F;
274 float result = instance.popFloat();
275 assertEquals(expResult, result, 0.0);
276
277 fail("The test case is a prototype.");
278 }
279
280
281
282
283 @Test
284 @Ignore
285 public void testPopInteger_0args() {
286 System.out.println("popInteger");
287 Stack instance = new Stack();
288 int expResult = 0;
289 int result = instance.popInteger();
290 assertEquals(expResult, result);
291
292 fail("The test case is a prototype.");
293 }
294
295
296
297
298 @Test
299 @Ignore
300 public void testPopInteger_int() {
301 System.out.println("popInteger");
302 int bytes = 0;
303 Stack instance = new Stack();
304 int expResult = 0;
305 int result = instance.popInteger(bytes);
306 assertEquals(expResult, result);
307
308 fail("The test case is a prototype.");
309 }
310
311
312
313
314 @Test
315 @Ignore
316 public void testPopLong_0args() {
317 System.out.println("popLong");
318 Stack instance = new Stack();
319 long expResult = 0L;
320 long result = instance.popLong();
321 assertEquals(expResult, result);
322
323 fail("The test case is a prototype.");
324 }
325
326
327
328
329 @Test
330 @Ignore
331 public void testPopLong_int() {
332 System.out.println("popLong");
333 int bytes = 0;
334 Stack instance = new Stack();
335 long expResult = 0L;
336 long result = instance.popLong(bytes);
337 assertEquals(expResult, result);
338
339 fail("The test case is a prototype.");
340 }
341
342
343
344
345 @Test
346 @Ignore
347 public void testPopMan() {
348 System.out.println("popMan");
349 Stack instance = new Stack();
350 String expResult = "";
351 String result = instance.popMan();
352 assertEquals(expResult, result);
353
354 fail("The test case is a prototype.");
355 }
356
357
358
359
360 @Test
361 @Ignore
362 public void testPopShort() {
363 System.out.println("popShort");
364 Stack instance = new Stack();
365 short expResult = 0;
366 short result = instance.popShort();
367 assertEquals(expResult, result);
368
369 fail("The test case is a prototype.");
370 }
371
372
373
374
375 @Test
376 @Ignore
377 public void testPopString() {
378 System.out.println("popString");
379 Stack instance = new Stack();
380 String expResult = "";
381 String result = instance.popString();
382 assertEquals(expResult, result);
383
384 fail("The test case is a prototype.");
385 }
386
387
388
389
390 @Test
391 @Ignore
392 public void testPopTimeStamp() {
393 System.out.println("popTimeStamp");
394 Stack instance = new Stack();
395 Date expResult = null;
396 Date result = instance.popTimeStamp();
397 assertEquals(expResult, result);
398
399 fail("The test case is a prototype.");
400 }
401
402 }