Introduce TmfLegacyExperiment
[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 assertEquals(1L, result);
161 }
162
163 /**
164 * @return
165 * @throws TmfTraceException
166 */
167 private CtfTmfTrace createTrace() throws TmfTraceException {
168 return TestParams.createTrace();
169 }
170
171 /**
172 * Run the int compareTo(CtfIterator) method test.
173 *
174 * @throws Exception
175 *
176 * @generatedBy CodePro at 03/05/12 2:29 PM
177 */
178 @Test
179 public void testCompareTo_2()
180 throws Exception {
181 CtfIterator fixture = new CtfIterator(createTrace());
182 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
183 ctfLocation.setLocation(new Long(1L));
184 fixture.setLocation(ctfLocation);
185 fixture.increaseRank();
186 CtfIterator o = new CtfIterator(createTrace());
187
188 int result = fixture.compareTo(o);
189
190 assertEquals(1, result);
191 }
192
193 /**
194 * Run the int compareTo(CtfIterator) method test.
195 *
196 * @throws Exception
197 *
198 * @generatedBy CodePro at 03/05/12 2:29 PM
199 */
200 @Test
201 public void testCompareTo_3()
202 throws Exception {
203 CtfIterator fixture = new CtfIterator(createTrace());
204 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
205 ctfLocation.setLocation(new Long(1L));
206 fixture.setLocation(ctfLocation);
207 fixture.increaseRank();
208 CtfIterator o = new CtfIterator(createTrace());
209
210 int result = fixture.compareTo(o);
211 assertEquals(1, result);
212 }
213
214 /**
215 * Run the void dispose() method test.
216 *
217 * @throws Exception
218 *
219 * @generatedBy CodePro at 03/05/12 2:29 PM
220 */
221 @Test
222 public void testDispose_1()
223 throws Exception {
224 CtfIterator fixture = new CtfIterator(createTrace());
225 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
226 ctfLocation.setLocation(new Long(1L));
227 fixture.setLocation(ctfLocation);
228 fixture.increaseRank();
229
230 fixture.dispose();
231 }
232
233 /**
234 * Run the boolean equals(Object) method test.
235 *
236 * @throws Exception
237 *
238 * @generatedBy CodePro at 03/05/12 2:29 PM
239 */
240 @Test
241 public void testEquals_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 CtfIterator obj = new CtfIterator(createTrace());
249 CtfLocation ctfLocation1 = new CtfLocation(new Long(1L));
250 ctfLocation1.setLocation(new Long(1L));
251 obj.setLocation(ctfLocation1);
252 obj.increaseRank();
253
254 boolean result = fixture.equals(obj);
255
256 assertTrue(result);
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_2()
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 Object obj = new Object();
275
276 boolean result = fixture.equals(obj);
277
278 assertFalse(result);
279 }
280
281 /**
282 * Run the boolean equals(Object) method test.
283 *
284 * @throws Exception
285 *
286 * @generatedBy CodePro at 03/05/12 2:29 PM
287 */
288 @Test
289 public void testEquals_3()
290 throws Exception {
291 CtfIterator fixture = new CtfIterator(createTrace());
292 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
293 ctfLocation.setLocation(new Long(1L));
294 fixture.setLocation(ctfLocation);
295 fixture.increaseRank();
296 Object obj = new Object();
297
298 boolean result = fixture.equals(obj);
299
300 assertFalse(result);
301 }
302
303 /**
304 * Run the CtfTmfTrace getCtfTmfTrace() method test.
305 *
306 * @throws Exception
307 *
308 * @generatedBy CodePro at 03/05/12 2:29 PM
309 */
310 @Test
311 public void testGetCtfTmfTrace_1()
312 throws Exception {
313 CtfIterator fixture = new CtfIterator(createTrace());
314 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
315 ctfLocation.setLocation(new Long(1L));
316 fixture.setLocation(ctfLocation);
317 fixture.increaseRank();
318
319 CtfTmfTrace result = fixture.getCtfTmfTrace();
320
321 // add additional test code here
322 // An unexpected exception was thrown in user code while executing this test:
323 // java.lang.NullPointerException
324 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
325 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
326 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
327 assertNotNull(result);
328 }
329
330 /**
331 * Run the CtfTmfEvent getCurrentEvent() method test.
332 *
333 * @throws Exception
334 *
335 * @generatedBy CodePro at 03/05/12 2:29 PM
336 */
337 @Test
338 public void testGetCurrentEvent_1()
339 throws Exception {
340 CtfIterator fixture = new CtfIterator(createTrace());
341 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
342 ctfLocation.setLocation(new Long(1L));
343 fixture.setLocation(ctfLocation);
344 fixture.increaseRank();
345
346 CtfTmfEvent result = fixture.getCurrentEvent();
347
348 // add additional test code here
349 // An unexpected exception was thrown in user code while executing this test:
350 // java.lang.NullPointerException
351 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
352 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
353 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
354 assertNotNull(result);
355 }
356
357 /**
358 * Run the CtfTmfEvent getCurrentEvent() method test.
359 *
360 * @throws Exception
361 *
362 * @generatedBy CodePro at 03/05/12 2:29 PM
363 */
364 @Test
365 public void testGetCurrentEvent_2()
366 throws Exception {
367 CtfIterator fixture = new CtfIterator(createTrace());
368 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
369 ctfLocation.setLocation(new Long(1L));
370 fixture.setLocation(ctfLocation);
371 fixture.increaseRank();
372
373 CtfTmfEvent result = fixture.getCurrentEvent();
374
375 // add additional test code here
376 // An unexpected exception was thrown in user code while executing this test:
377 // java.lang.NullPointerException
378 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
379 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
380 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
381 assertNotNull(result);
382 }
383
384 /**
385 * Run the CtfLocation getLocation() method test.
386 *
387 * @throws Exception
388 *
389 * @generatedBy CodePro at 03/05/12 2:29 PM
390 */
391 @Test
392 public void testGetLocation_1()
393 throws Exception {
394 CtfIterator fixture = new CtfIterator(createTrace());
395 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
396 ctfLocation.setLocation(new Long(1L));
397 fixture.setLocation(ctfLocation);
398 fixture.increaseRank();
399
400 CtfLocation result = fixture.getLocation();
401
402 // add additional test code here
403 // An unexpected exception was thrown in user code while executing this test:
404 // java.lang.NullPointerException
405 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
406 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
407 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
408 assertNotNull(result);
409 }
410
411 /**
412 * Run the long getRank() method test.
413 *
414 * @throws Exception
415 *
416 * @generatedBy CodePro at 03/05/12 2:29 PM
417 */
418 @Test
419 public void testGetRank_1()
420 throws Exception {
421 CtfIterator fixture = new CtfIterator(createTrace());
422 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
423 ctfLocation.setLocation(new Long(1L));
424 fixture.setLocation(ctfLocation);
425 fixture.increaseRank();
426
427 long result = fixture.getRank();
428
429 // add additional test code here
430 // An unexpected exception was thrown in user code while executing this test:
431 // java.lang.NullPointerException
432 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
433 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
434 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
435 assertEquals(1L, result);
436 }
437
438 /**
439 * Run the boolean hasValidRank() method test.
440 *
441 * @throws Exception
442 *
443 * @generatedBy CodePro at 03/05/12 2:29 PM
444 */
445 @Test
446 public void testHasValidRank_1()
447 throws Exception {
448 CtfIterator fixture = new CtfIterator(createTrace());
449 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
450 ctfLocation.setLocation(new Long(1L));
451 fixture.setLocation(ctfLocation);
452 fixture.increaseRank();
453
454 boolean result = fixture.hasValidRank();
455
456 // add additional test code here
457 // An unexpected exception was thrown in user code while executing this test:
458 // java.lang.NullPointerException
459 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
460 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
461 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
462 assertTrue(result);
463 }
464
465 /**
466 * Run the boolean hasValidRank() method test.
467 *
468 * @throws Exception
469 *
470 * @generatedBy CodePro at 03/05/12 2:29 PM
471 */
472 @Test
473 public void testHasValidRank_2()
474 throws Exception {
475 CtfIterator fixture = new CtfIterator(createTrace());
476 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
477 ctfLocation.setLocation(new Long(1L));
478 fixture.setLocation(ctfLocation);
479 fixture.increaseRank();
480
481 boolean result = fixture.hasValidRank();
482
483 // add additional test code here
484 // An unexpected exception was thrown in user code while executing this test:
485 // java.lang.NullPointerException
486 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
487 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
488 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
489 assertTrue(result);
490 }
491
492 /**
493 * Run the int hashCode() method test.
494 *
495 * @throws Exception
496 *
497 * @generatedBy CodePro at 03/05/12 2:29 PM
498 */
499 @Test
500 public void testHashCode_1()
501 throws Exception {
502 CtfIterator fixture = new CtfIterator(createTrace());
503 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
504 ctfLocation.setLocation(new Long(1L));
505 fixture.setLocation(ctfLocation);
506 fixture.increaseRank();
507
508 int result = fixture.hashCode();
509 int result2 = fixture.hashCode();
510 assertEquals(result, result2);
511 }
512
513 /**
514 * Run the void increaseRank() method test.
515 *
516 * @throws Exception
517 *
518 * @generatedBy CodePro at 03/05/12 2:29 PM
519 */
520 @Test
521 public void testIncreaseRank_1()
522 throws Exception {
523 CtfIterator fixture = new CtfIterator(createTrace());
524 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
525 ctfLocation.setLocation(new Long(1L));
526 fixture.setLocation(ctfLocation);
527 fixture.increaseRank();
528
529 fixture.increaseRank();
530
531 // add additional test code here
532 // An unexpected exception was thrown in user code while executing this test:
533 // java.lang.NullPointerException
534 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
535 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
536 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
537 }
538
539 /**
540 * Run the boolean seek(long) method test.
541 *
542 * @throws Exception
543 *
544 * @generatedBy CodePro at 03/05/12 2:29 PM
545 */
546 @Test
547 public void testSeek_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 long timestamp = 1L;
555
556 boolean result = fixture.seek(timestamp);
557
558 // add additional test code here
559 // An unexpected exception was thrown in user code while executing this test:
560 // java.lang.NullPointerException
561 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
562 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
563 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
564 assertTrue(result);
565 }
566
567 /**
568 * Run the boolean seek(long) method test.
569 *
570 * @throws Exception
571 *
572 * @generatedBy CodePro at 03/05/12 2:29 PM
573 */
574 @Test
575 public void testSeek_2()
576 throws Exception {
577 CtfIterator fixture = new CtfIterator(createTrace());
578 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
579 ctfLocation.setLocation(new Long(1L));
580 fixture.setLocation(ctfLocation);
581 fixture.increaseRank();
582 long timestamp = 1L;
583
584 boolean result = fixture.seek(timestamp);
585
586 // add additional test code here
587 // An unexpected exception was thrown in user code while executing this test:
588 // java.lang.NullPointerException
589 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
590 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
591 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
592 assertTrue(result);
593 }
594
595 /**
596 * Run the boolean seekRank(long) method test.
597 *
598 * @throws Exception
599 *
600 * @generatedBy CodePro at 03/05/12 2:29 PM
601 */
602 @Test
603 public void testSeekRank_1()
604 throws Exception {
605 CtfIterator fixture = new CtfIterator(createTrace());
606 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
607 ctfLocation.setLocation(new Long(1L));
608 fixture.setLocation(ctfLocation);
609 fixture.increaseRank();
610 long rank = 1L;
611
612 boolean result = fixture.seekRank(rank);
613
614 // add additional test code here
615 // An unexpected exception was thrown in user code while executing this test:
616 // java.lang.NullPointerException
617 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
618 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
619 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
620 assertTrue(result);
621 }
622
623 /**
624 * Run the boolean seekRank(long) method test.
625 *
626 * @throws Exception
627 *
628 * @generatedBy CodePro at 03/05/12 2:29 PM
629 */
630 @Test
631 public void testSeekRank_2()
632 throws Exception {
633 CtfIterator fixture = new CtfIterator(createTrace());
634 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
635 ctfLocation.setLocation(new Long(1L));
636 fixture.setLocation(ctfLocation);
637 fixture.increaseRank();
638 long rank = 1L;
639
640 boolean result = fixture.seekRank(rank);
641
642 // add additional test code here
643 // An unexpected exception was thrown in user code while executing this test:
644 // java.lang.NullPointerException
645 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
646 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
647 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
648 assertTrue(result);
649 }
650
651 /**
652 * Run the void setLocation(ITmfLocation<?>) method test.
653 *
654 * @throws Exception
655 *
656 * @generatedBy CodePro at 03/05/12 2:29 PM
657 */
658 @Test
659 public void testSetLocation_1()
660 throws Exception {
661 CtfIterator fixture = new CtfIterator(createTrace());
662 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
663 ctfLocation.setLocation(new Long(1L));
664 fixture.setLocation(ctfLocation);
665 fixture.increaseRank();
666 CtfLocation location = new CtfLocation(new Long(1L));
667 location.setLocation(new Long(1L));
668
669 fixture.setLocation(location);
670
671 // add additional test code here
672 // An unexpected exception was thrown in user code while executing this test:
673 // java.lang.NullPointerException
674 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
675 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
676 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
677 }
678
679 /**
680 * Run the void setRank(long) method test.
681 *
682 * @throws Exception
683 *
684 * @generatedBy CodePro at 03/05/12 2:29 PM
685 */
686 @Test
687 public void testSetRank_1()
688 throws Exception {
689 CtfIterator fixture = new CtfIterator(createTrace());
690 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
691 ctfLocation.setLocation(new Long(1L));
692 fixture.setLocation(ctfLocation);
693 fixture.increaseRank();
694 long rank = 1L;
695
696 fixture.setRank(rank);
697
698 // add additional test code here
699 // An unexpected exception was thrown in user code while executing this test:
700 // java.lang.NullPointerException
701 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
702 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
703 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
704 }
705
706 /**
707 * Run the void setRank(long) method test.
708 *
709 * @throws Exception
710 *
711 * @generatedBy CodePro at 03/05/12 2:29 PM
712 */
713 @Test
714 public void testSetRank_2()
715 throws Exception {
716 CtfIterator fixture = new CtfIterator(createTrace());
717 CtfLocation ctfLocation = new CtfLocation(new Long(1L));
718 ctfLocation.setLocation(new Long(1L));
719 fixture.setLocation(ctfLocation);
720 fixture.increaseRank();
721 long rank = 1L;
722
723 fixture.setRank(rank);
724
725 // add additional test code here
726 // An unexpected exception was thrown in user code while executing this test:
727 // java.lang.NullPointerException
728 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
729 // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
730 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
731 }
732
733 /**
734 * Perform pre-test initialization.
735 *
736 * @throws Exception
737 * if the initialization fails for some reason
738 *
739 * @generatedBy CodePro at 03/05/12 2:29 PM
740 */
741 @Before
742 public void setUp()
743 throws Exception {
744 // add additional set up code here
745 }
746
747 /**
748 * Perform post-test clean-up.
749 *
750 * @throws Exception
751 * if the clean-up fails for some reason
752 *
753 * @generatedBy CodePro at 03/05/12 2:29 PM
754 */
755 @After
756 public void tearDown()
757 throws Exception {
758 // Add additional tear down code here
759 }
760
761 /**
762 * Launch the test.
763 *
764 * @param args the command line arguments
765 *
766 * @generatedBy CodePro at 03/05/12 2:29 PM
767 */
768 public static void main(String[] args) {
769 new org.junit.runner.JUnitCore().run(CtfIteratorTest.class);
770 }
771 }
This page took 0.050605 seconds and 5 git commands to generate.