Improve test cases. Coverage of 85%+ and fix bugs.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / CtfIteratorTest.java
1 package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
2
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertFalse;
5 import static org.junit.Assert.assertNotNull;
6 import static org.junit.Assert.assertTrue;
7
8 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator;
9 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocation;
10 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
11 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
12 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
13 import org.junit.After;
14 import org.junit.Before;
15 import org.junit.Test;
16
17 /**
18 * The class <code>CtfIteratorTest</code> contains tests for the class <code>{@link CtfIterator}</code>.
19 *
20 * @generatedBy CodePro at 03/05/12 2:29 PM
21 * @author ematkho
22 * @version $Revision: 1.0 $
23 */
24 @SuppressWarnings("static-method")
25 public class CtfIteratorTest {
26 /**
27 * Run the CtfIterator(CtfTmfTrace) constructor test.
28 *
29 * @throws Exception
30 *
31 * @generatedBy CodePro at 03/05/12 2:29 PM
32 */
33 @Test
34 public void testCtfIterator_1()
35 throws Exception {
36 CtfTmfTrace trace = createTrace();
37 CtfIterator result = new CtfIterator(trace);
38 assertNotNull(result);
39 }
40
41 /**
42 * Run the CtfIterator(CtfTmfTrace) constructor test.
43 *
44 * @throws Exception
45 *
46 * @generatedBy CodePro at 03/05/12 2:29 PM
47 */
48 @Test
49 public void testCtfIterator_2()
50 throws Exception {
51 CtfTmfTrace trace = createTrace();
52 trace.init("test");
53
54 CtfIterator result = new CtfIterator(trace);
55
56 assertNotNull(result);
57 }
58
59 /**
60 * Run the CtfIterator(CtfTmfTrace,long,long) constructor test.
61 *
62 * @throws Exception
63 *
64 * @generatedBy CodePro at 03/05/12 2:29 PM
65 */
66 @Test
67 public void testCtfIterator_3()
68 throws Exception {
69 CtfTmfTrace trace = createTrace();
70 long timestampValue = 1L;
71 long rank = 1L;
72
73 CtfIterator result = new CtfIterator(trace, timestampValue, rank);
74
75 assertNotNull(result);
76 }
77
78
79 /**
80 * Run the boolean advance() method test.
81 *
82 * @throws Exception
83 *
84 * @generatedBy CodePro at 03/05/12 2:29 PM
85 */
86 @Test
87 public void testAdvance_1()
88 throws Exception {
89 CtfIterator fixture = new CtfIterator(createTrace());
90 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
91 ctfLocation.setLocation(new Long(1L));
92 fixture.setLocation(ctfLocation);
93 fixture.increaseRank();
94
95 boolean result = fixture.advance();
96 assertTrue(result);
97 }
98
99 /**
100 * Run the boolean advance() method test.
101 *
102 * @throws Exception
103 *
104 * @generatedBy CodePro at 03/05/12 2:29 PM
105 */
106 @Test
107 public void testAdvance_2()
108 throws Exception {
109 CtfIterator fixture = new CtfIterator(createTrace());
110 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
111 ctfLocation.setLocation(new Long(1L));
112 fixture.setLocation(ctfLocation);
113 fixture.increaseRank();
114
115 boolean result = fixture.advance();
116
117 assertTrue(result);
118 }
119
120 /**
121 * Run the CtfIterator clone() method test.
122 *
123 * @throws Exception
124 *
125 * @generatedBy CodePro at 03/05/12 2:29 PM
126 */
127 @Test
128 public void testClone_1()
129 throws Exception {
130 CtfIterator fixture = new CtfIterator(createTrace());
131 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
132 ctfLocation.setLocation(new Long(1L));
133 fixture.setLocation(ctfLocation);
134 fixture.increaseRank();
135
136 CtfIterator result = fixture.clone();
137 assertNotNull(result);
138 }
139
140 /**
141 * Run the int compareTo(CtfIterator) method test.
142 *
143 * @throws Exception
144 *
145 * @generatedBy CodePro at 03/05/12 2:29 PM
146 */
147
148 @Test
149 public void testCompareTo_1()
150 throws Exception {
151 CtfIterator fixture = new CtfIterator(createTrace());
152 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
153 ctfLocation.setLocation(new Long(1L));
154 fixture.setLocation(ctfLocation);
155 fixture.increaseRank();
156 CtfIterator o = new CtfIterator(createTrace());
157
158 int result = fixture.compareTo(o);
159
160 // add additional test code here
161 // An unexpected exception was thrown in user code while executing this test:
162 // java.lang.NullPointerException
163 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
164 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
165 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
166 assertEquals(0, result);
167 }
168
169 /**
170 * @return
171 * @throws TmfTraceException
172 */
173 private CtfTmfTrace createTrace() throws TmfTraceException {
174 return TestParams.createTrace();
175 }
176
177 /**
178 * Run the int compareTo(CtfIterator) method test.
179 *
180 * @throws Exception
181 *
182 * @generatedBy CodePro at 03/05/12 2:29 PM
183 */
184 @Test
185 public void testCompareTo_2()
186 throws Exception {
187 CtfIterator fixture = new CtfIterator(createTrace());
188 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
189 ctfLocation.setLocation(new Long(1L));
190 fixture.setLocation(ctfLocation);
191 fixture.increaseRank();
192 CtfIterator o = new CtfIterator(createTrace());
193
194 int result = fixture.compareTo(o);
195
196 // add additional test code here
197 // An unexpected exception was thrown in user code while executing this test:
198 // java.lang.NullPointerException
199 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
200 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
201 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
202 assertEquals(0, result);
203 }
204
205 /**
206 * Run the int compareTo(CtfIterator) method test.
207 *
208 * @throws Exception
209 *
210 * @generatedBy CodePro at 03/05/12 2:29 PM
211 */
212 @Test
213 public void testCompareTo_3()
214 throws Exception {
215 CtfIterator fixture = new CtfIterator(createTrace());
216 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
217 ctfLocation.setLocation(new Long(1L));
218 fixture.setLocation(ctfLocation);
219 fixture.increaseRank();
220 CtfIterator o = new CtfIterator(createTrace());
221
222 int result = fixture.compareTo(o);
223
224 // add additional test code here
225 // An unexpected exception was thrown in user code while executing this test:
226 // java.lang.NullPointerException
227 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
228 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
229 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
230 assertEquals(0, result);
231 }
232
233 /**
234 * Run the void dispose() method test.
235 *
236 * @throws Exception
237 *
238 * @generatedBy CodePro at 03/05/12 2:29 PM
239 */
240 @Test
241 public void testDispose_1()
242 throws Exception {
243 CtfIterator fixture = new CtfIterator(createTrace());
244 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
245 ctfLocation.setLocation(new Long(1L));
246 fixture.setLocation(ctfLocation);
247 fixture.increaseRank();
248
249 fixture.dispose();
250
251 // add additional test code here
252 // An unexpected exception was thrown in user code while executing this test:
253 // java.lang.NullPointerException
254 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
255 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
256 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
257 }
258
259 /**
260 * Run the boolean equals(Object) method test.
261 *
262 * @throws Exception
263 *
264 * @generatedBy CodePro at 03/05/12 2:29 PM
265 */
266 @Test
267 public void testEquals_1()
268 throws Exception {
269 CtfIterator fixture = new CtfIterator(createTrace());
270 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
271 ctfLocation.setLocation(new Long(1L));
272 fixture.setLocation(ctfLocation);
273 fixture.increaseRank();
274 CtfIterator obj = new CtfIterator(createTrace());
275 CtfLocation ctfLocation1 = new CtfLocation(new Long(1L));
276 ctfLocation1.setLocation(new Long(1L));
277 obj.setLocation(ctfLocation1);
278 obj.increaseRank();
279
280 boolean result = fixture.equals(obj);
281
282 assertTrue(result);
283 }
284
285 /**
286 * Run the boolean equals(Object) method test.
287 *
288 * @throws Exception
289 *
290 * @generatedBy CodePro at 03/05/12 2:29 PM
291 */
292 @Test
293 public void testEquals_2()
294 throws Exception {
295 CtfIterator fixture = new CtfIterator(createTrace());
296 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
297 ctfLocation.setLocation(new Long(1L));
298 fixture.setLocation(ctfLocation);
299 fixture.increaseRank();
300 Object obj = new Object();
301
302 boolean result = fixture.equals(obj);
303
304 assertFalse(result);
305 }
306
307 /**
308 * Run the boolean equals(Object) method test.
309 *
310 * @throws Exception
311 *
312 * @generatedBy CodePro at 03/05/12 2:29 PM
313 */
314 @Test
315 public void testEquals_3()
316 throws Exception {
317 CtfIterator fixture = new CtfIterator(createTrace());
318 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
319 ctfLocation.setLocation(new Long(1L));
320 fixture.setLocation(ctfLocation);
321 fixture.increaseRank();
322 Object obj = new Object();
323
324 boolean result = fixture.equals(obj);
325
326 assertFalse(result);
327 }
328
329 /**
330 * Run the CtfTmfTrace getCtfTmfTrace() method test.
331 *
332 * @throws Exception
333 *
334 * @generatedBy CodePro at 03/05/12 2:29 PM
335 */
336 @Test
337 public void testGetCtfTmfTrace_1()
338 throws Exception {
339 CtfIterator fixture = new CtfIterator(createTrace());
340 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
341 ctfLocation.setLocation(new Long(1L));
342 fixture.setLocation(ctfLocation);
343 fixture.increaseRank();
344
345 CtfTmfTrace result = fixture.getCtfTmfTrace();
346
347 // add additional test code here
348 // An unexpected exception was thrown in user code while executing this test:
349 // java.lang.NullPointerException
350 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
351 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
352 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
353 assertNotNull(result);
354 }
355
356 /**
357 * Run the CtfTmfEvent getCurrentEvent() method test.
358 *
359 * @throws Exception
360 *
361 * @generatedBy CodePro at 03/05/12 2:29 PM
362 */
363 @Test
364 public void testGetCurrentEvent_1()
365 throws Exception {
366 CtfIterator fixture = new CtfIterator(createTrace());
367 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
368 ctfLocation.setLocation(new Long(1L));
369 fixture.setLocation(ctfLocation);
370 fixture.increaseRank();
371
372 CtfTmfEvent result = fixture.getCurrentEvent();
373
374 // add additional test code here
375 // An unexpected exception was thrown in user code while executing this test:
376 // java.lang.NullPointerException
377 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
378 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
379 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
380 assertNotNull(result);
381 }
382
383 /**
384 * Run the CtfTmfEvent getCurrentEvent() method test.
385 *
386 * @throws Exception
387 *
388 * @generatedBy CodePro at 03/05/12 2:29 PM
389 */
390 @Test
391 public void testGetCurrentEvent_2()
392 throws Exception {
393 CtfIterator fixture = new CtfIterator(createTrace());
394 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
395 ctfLocation.setLocation(new Long(1L));
396 fixture.setLocation(ctfLocation);
397 fixture.increaseRank();
398
399 CtfTmfEvent result = fixture.getCurrentEvent();
400
401 // add additional test code here
402 // An unexpected exception was thrown in user code while executing this test:
403 // java.lang.NullPointerException
404 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
405 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
406 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
407 assertNotNull(result);
408 }
409
410 /**
411 * Run the CtfLocation getLocation() method test.
412 *
413 * @throws Exception
414 *
415 * @generatedBy CodePro at 03/05/12 2:29 PM
416 */
417 @Test
418 public void testGetLocation_1()
419 throws Exception {
420 CtfIterator fixture = new CtfIterator(createTrace());
421 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
422 ctfLocation.setLocation(new Long(1L));
423 fixture.setLocation(ctfLocation);
424 fixture.increaseRank();
425
426 CtfLocation result = fixture.getLocation();
427
428 // add additional test code here
429 // An unexpected exception was thrown in user code while executing this test:
430 // java.lang.NullPointerException
431 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
432 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
433 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
434 assertNotNull(result);
435 }
436
437 /**
438 * Run the long getRank() method test.
439 *
440 * @throws Exception
441 *
442 * @generatedBy CodePro at 03/05/12 2:29 PM
443 */
444 @Test
445 public void testGetRank_1()
446 throws Exception {
447 CtfIterator fixture = new CtfIterator(createTrace());
448 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
449 ctfLocation.setLocation(new Long(1L));
450 fixture.setLocation(ctfLocation);
451 fixture.increaseRank();
452
453 long result = fixture.getRank();
454
455 // add additional test code here
456 // An unexpected exception was thrown in user code while executing this test:
457 // java.lang.NullPointerException
458 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
459 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
460 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
461 assertEquals(0L, result);
462 }
463
464 /**
465 * Run the boolean hasValidRank() method test.
466 *
467 * @throws Exception
468 *
469 * @generatedBy CodePro at 03/05/12 2:29 PM
470 */
471 @Test
472 public void testHasValidRank_1()
473 throws Exception {
474 CtfIterator fixture = new CtfIterator(createTrace());
475 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
476 ctfLocation.setLocation(new Long(1L));
477 fixture.setLocation(ctfLocation);
478 fixture.increaseRank();
479
480 boolean result = fixture.hasValidRank();
481
482 // add additional test code here
483 // An unexpected exception was thrown in user code while executing this test:
484 // java.lang.NullPointerException
485 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
486 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
487 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
488 assertTrue(result);
489 }
490
491 /**
492 * Run the boolean hasValidRank() method test.
493 *
494 * @throws Exception
495 *
496 * @generatedBy CodePro at 03/05/12 2:29 PM
497 */
498 @Test
499 public void testHasValidRank_2()
500 throws Exception {
501 CtfIterator fixture = new CtfIterator(createTrace());
502 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
503 ctfLocation.setLocation(new Long(1L));
504 fixture.setLocation(ctfLocation);
505 fixture.increaseRank();
506
507 boolean result = fixture.hasValidRank();
508
509 // add additional test code here
510 // An unexpected exception was thrown in user code while executing this test:
511 // java.lang.NullPointerException
512 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
513 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
514 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
515 assertTrue(result);
516 }
517
518 /**
519 * Run the int hashCode() method test.
520 *
521 * @throws Exception
522 *
523 * @generatedBy CodePro at 03/05/12 2:29 PM
524 */
525 @Test
526 public void testHashCode_1()
527 throws Exception {
528 CtfIterator fixture = new CtfIterator(createTrace());
529 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
530 ctfLocation.setLocation(new Long(1L));
531 fixture.setLocation(ctfLocation);
532 fixture.increaseRank();
533
534 int result = fixture.hashCode();
535 int result2 = fixture.hashCode();
536 assertEquals(result, result2);
537 }
538
539 /**
540 * Run the void increaseRank() method test.
541 *
542 * @throws Exception
543 *
544 * @generatedBy CodePro at 03/05/12 2:29 PM
545 */
546 @Test
547 public void testIncreaseRank_1()
548 throws Exception {
549 CtfIterator fixture = new CtfIterator(createTrace());
550 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
551 ctfLocation.setLocation(new Long(1L));
552 fixture.setLocation(ctfLocation);
553 fixture.increaseRank();
554
555 fixture.increaseRank();
556
557 // add additional test code here
558 // An unexpected exception was thrown in user code while executing this test:
559 // java.lang.NullPointerException
560 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
561 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
562 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
563 }
564
565 /**
566 * Run the boolean seek(long) method test.
567 *
568 * @throws Exception
569 *
570 * @generatedBy CodePro at 03/05/12 2:29 PM
571 */
572 @Test
573 public void testSeek_1()
574 throws Exception {
575 CtfIterator fixture = new CtfIterator(createTrace());
576 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
577 ctfLocation.setLocation(new Long(1L));
578 fixture.setLocation(ctfLocation);
579 fixture.increaseRank();
580 long timestamp = 1L;
581
582 boolean result = fixture.seek(timestamp);
583
584 // add additional test code here
585 // An unexpected exception was thrown in user code while executing this test:
586 // java.lang.NullPointerException
587 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
588 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
589 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
590 assertTrue(result);
591 }
592
593 /**
594 * Run the boolean seek(long) method test.
595 *
596 * @throws Exception
597 *
598 * @generatedBy CodePro at 03/05/12 2:29 PM
599 */
600 @Test
601 public void testSeek_2()
602 throws Exception {
603 CtfIterator fixture = new CtfIterator(createTrace());
604 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
605 ctfLocation.setLocation(new Long(1L));
606 fixture.setLocation(ctfLocation);
607 fixture.increaseRank();
608 long timestamp = 1L;
609
610 boolean result = fixture.seek(timestamp);
611
612 // add additional test code here
613 // An unexpected exception was thrown in user code while executing this test:
614 // java.lang.NullPointerException
615 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
616 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
617 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
618 assertTrue(result);
619 }
620
621 /**
622 * Run the boolean seekRank(long) method test.
623 *
624 * @throws Exception
625 *
626 * @generatedBy CodePro at 03/05/12 2:29 PM
627 */
628 @Test
629 public void testSeekRank_1()
630 throws Exception {
631 CtfIterator fixture = new CtfIterator(createTrace());
632 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
633 ctfLocation.setLocation(new Long(1L));
634 fixture.setLocation(ctfLocation);
635 fixture.increaseRank();
636 long rank = 1L;
637
638 boolean result = fixture.seekRank(rank);
639
640 // add additional test code here
641 // An unexpected exception was thrown in user code while executing this test:
642 // java.lang.NullPointerException
643 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
644 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
645 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
646 assertTrue(result);
647 }
648
649 /**
650 * Run the boolean seekRank(long) method test.
651 *
652 * @throws Exception
653 *
654 * @generatedBy CodePro at 03/05/12 2:29 PM
655 */
656 @Test
657 public void testSeekRank_2()
658 throws Exception {
659 CtfIterator fixture = new CtfIterator(createTrace());
660 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
661 ctfLocation.setLocation(new Long(1L));
662 fixture.setLocation(ctfLocation);
663 fixture.increaseRank();
664 long rank = 1L;
665
666 boolean result = fixture.seekRank(rank);
667
668 // add additional test code here
669 // An unexpected exception was thrown in user code while executing this test:
670 // java.lang.NullPointerException
671 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
672 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
673 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
674 assertTrue(result);
675 }
676
677 /**
678 * Run the void setLocation(ITmfLocation<?>) method test.
679 *
680 * @throws Exception
681 *
682 * @generatedBy CodePro at 03/05/12 2:29 PM
683 */
684 @Test
685 public void testSetLocation_1()
686 throws Exception {
687 CtfIterator fixture = new CtfIterator(createTrace());
688 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
689 ctfLocation.setLocation(new Long(1L));
690 fixture.setLocation(ctfLocation);
691 fixture.increaseRank();
692 CtfLocation location = new CtfLocation(new Long(1L));
693 location.setLocation(new Long(1L));
694
695 fixture.setLocation(location);
696
697 // add additional test code here
698 // An unexpected exception was thrown in user code while executing this test:
699 // java.lang.NullPointerException
700 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
701 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
702 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
703 }
704
705 /**
706 * Run the void setRank(long) method test.
707 *
708 * @throws Exception
709 *
710 * @generatedBy CodePro at 03/05/12 2:29 PM
711 */
712 @Test
713 public void testSetRank_1()
714 throws Exception {
715 CtfIterator fixture = new CtfIterator(createTrace());
716 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
717 ctfLocation.setLocation(new Long(1L));
718 fixture.setLocation(ctfLocation);
719 fixture.increaseRank();
720 long rank = 1L;
721
722 fixture.setRank(rank);
723
724 // add additional test code here
725 // An unexpected exception was thrown in user code while executing this test:
726 // java.lang.NullPointerException
727 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
728 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
729 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
730 }
731
732 /**
733 * Run the void setRank(long) method test.
734 *
735 * @throws Exception
736 *
737 * @generatedBy CodePro at 03/05/12 2:29 PM
738 */
739 @Test
740 public void testSetRank_2()
741 throws Exception {
742 CtfIterator fixture = new CtfIterator(createTrace());
743 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
744 ctfLocation.setLocation(new Long(1L));
745 fixture.setLocation(ctfLocation);
746 fixture.increaseRank();
747 long rank = 1L;
748
749 fixture.setRank(rank);
750
751 // add additional test code here
752 // An unexpected exception was thrown in user code while executing this test:
753 // java.lang.NullPointerException
754 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
755 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
756 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
757 }
758
759 /**
760 * Perform pre-test initialization.
761 *
762 * @throws Exception
763 * if the initialization fails for some reason
764 *
765 * @generatedBy CodePro at 03/05/12 2:29 PM
766 */
767 @Before
768 public void setUp()
769 throws Exception {
770 // add additional set up code here
771 }
772
773 /**
774 * Perform post-test clean-up.
775 *
776 * @throws Exception
777 * if the clean-up fails for some reason
778 *
779 * @generatedBy CodePro at 03/05/12 2:29 PM
780 */
781 @After
782 public void tearDown()
783 throws Exception {
784 // Add additional tear down code here
785 }
786
787 /**
788 * Launch the test.
789 *
790 * @param args the command line arguments
791 *
792 * @generatedBy CodePro at 03/05/12 2:29 PM
793 */
794 public static void main(String[] args) {
795 new org.junit.runner.JUnitCore().run(CtfIteratorTest.class);
796 }
797 }
This page took 0.047646 seconds and 6 git commands to generate.