Clean up duplicate function
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / CtfTmfTraceTest.java
CommitLineData
81c8e6f7
MK
1package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
2
3import static org.junit.Assert.assertEquals;
4import static org.junit.Assert.assertNotNull;
5import static org.junit.Assert.assertNull;
6import static org.junit.Assert.assertTrue;
7
8import org.eclipse.core.resources.IProject;
9import org.eclipse.core.resources.IResource;
10import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocation;
11import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
12import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
13import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
81c8e6f7
MK
14import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
15import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
16import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
17import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
81c8e6f7
MK
18import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
19import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
20import org.eclipse.linuxtools.tmf.core.statesystem.IStateSystemQuerier;
21import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
81c8e6f7
MK
22import org.junit.After;
23import org.junit.Before;
24import org.junit.Test;
25
26/**
27 * The class <code>CtfTmfTraceTest</code> contains tests for the class <code>{@link CtfTmfTrace}</code>.
28 *
29 * @generatedBy CodePro at 03/05/12 2:29 PM
30 * @author ematkho
31 * @version $Revision: 1.0 $
32 */
33public class CtfTmfTraceTest {
34 private static final String PATH = TestParams.getPath();
35
36 /**
37 * Run the CtfTmfTrace() constructor test.
38 *
39 * @throws Exception
40 *
41 * @generatedBy CodePro at 03/05/12 2:29 PM
42 */
43 @Test
44 public void testCtfTmfTrace_1()
45 throws Exception {
46
47 CtfTmfTrace result = new CtfTmfTrace();
48
49 // add additional test code here
50 assertNotNull(result);
51 assertEquals(null, result.getEventType());
bfe038ff 52 assertEquals(1000, result.getCacheSize());
81c8e6f7
MK
53 assertEquals(0L, result.getNbEvents());
54 assertEquals(0L, result.getStreamingInterval());
55 assertEquals(null, result.getStateSystem());
56 assertEquals(null, result.getResource());
57 assertEquals(1000, result.getQueueSize());
58 assertEquals(null, result.getType());
59 }
60
81c8e6f7
MK
61 /**
62 * @return
63 * @throws TmfTraceException
64 */
65 private CtfTmfTrace initTrace() throws TmfTraceException {
66 CtfTmfTrace fixture = new CtfTmfTrace();
67 fixture.initTrace((IResource) null, PATH, CtfTmfEvent.class);
68 return fixture;
69 }
81c8e6f7
MK
70 /**
71 * Run the void broadcast(TmfSignal) method test.
72 *
73 * @throws Exception
74 *
75 * @generatedBy CodePro at 03/05/12 2:29 PM
76 */
77 @Test
78 public void testBroadcast_1()
79 throws Exception {
80 CtfTmfTrace fixture = initTrace();
81 TmfSignal signal = new TmfEndSynchSignal(1);
82
83 fixture.broadcast(signal);
84
85 // add additional test code here
86 // An unexpected exception was thrown in user code while executing this test:
87 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
88 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
89 }
90
91
92 /**
93 * Run the void dispose() method test.
94 *
95 * @throws Exception
96 *
97 * @generatedBy CodePro at 03/05/12 2:29 PM
98 */
99 @Test
100 public void testDispose_1()
101 throws Exception {
102 CtfTmfTrace fixture = new CtfTmfTrace();
103
104 fixture.dispose();
105
106 }
107
108 /**
109 * Run the int getCacheSize() method test.
110 *
111 * @throws Exception
112 *
113 * @generatedBy CodePro at 03/05/12 2:29 PM
114 */
115 @Test
116 public void testGetCacheSize_1()
117 throws Exception {
118 CtfTmfTrace fixture = new CtfTmfTrace();
119
120 int result = fixture.getCacheSize();
121
122 // add additional test code here
123 // An unexpected exception was thrown in user code while executing this test:
124 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
125 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
bfe038ff 126 assertEquals(1000, result);
81c8e6f7
MK
127 }
128
129 /**
130 * Run the ITmfLocation<Comparable> getCurrentLocation() method test.
131 *
132 * @throws Exception
133 *
134 * @generatedBy CodePro at 03/05/12 2:29 PM
135 */
136 @Test
137 public void testGetCurrentLocation_1()
138 throws Exception {
139 CtfTmfTrace fixture = initTrace();
140
141 CtfLocation result = (CtfLocation) fixture.getCurrentLocation();
142
143 // add additional test code here
144 // An unexpected exception was thrown in user code while executing this test:
145 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
146 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
f474d36b 147 assertNull(result);
81c8e6f7
MK
148 }
149
150 @Test
151 public void testSeekEventLoc_1() throws TmfTraceException {
152 CtfTmfTrace fixture = initTrace();
153 CtfLocation loc = null;
154 fixture.seekEvent(loc);
155 assertNotNull(fixture);
156 }
157
158 @Test
159 public void testSeekEventLoc_2() throws TmfTraceException {
160 CtfTmfTrace fixture = initTrace();
161 CtfLocation loc = new CtfLocation(new CtfTmfTimestamp(0L));
162 fixture.seekEvent(loc);
163 assertNotNull(fixture);
164 }
165
166
167 /**
168 * Run the ITmfTimestamp getEndTime() method test.
169 *
170 * @throws Exception
171 *
172 * @generatedBy CodePro at 03/05/12 2:29 PM
173 */
174 @Test
175 public void testGetEndTime_1()
176 throws Exception {
177 CtfTmfTrace fixture = initTrace();
178 ITmfTimestamp result = fixture.getEndTime();
179 assertNotNull(result);
180 }
181
182 /**
183 * Run the String[] getEnvNames() method test.
184 *
185 * @throws Exception
186 *
187 * @generatedBy CodePro at 03/05/12 2:29 PM
188 */
189 @Test
190 public void testGetEnvNames_1()
191 throws Exception {
192 CtfTmfTrace fixture = initTrace();
193
194 String[] result = fixture.getEnvNames();
195
196 // add additional test code here
197 // An unexpected exception was thrown in user code while executing this test:
198 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
199 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
200 assertNotNull(result);
201 }
202
203 /**
204 * Run the String getEnvValue(String) method test.
205 *
206 * @throws Exception
207 *
208 * @generatedBy CodePro at 03/05/12 2:29 PM
209 */
210 @Test
211 public void testGetEnvValue_1()
212 throws Exception {
213 CtfTmfTrace fixture = initTrace();
214 String key = "tracer_name"; //$NON-NLS-1$
215
216 String result = fixture.getEnvValue(key);
217
218 // add additional test code here
219 // An unexpected exception was thrown in user code while executing this test:
220 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
221 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
222 assertEquals("\"lttng-modules\"",result); //$NON-NLS-1$
223 }
224
225 /**
226 * Run the Class<CtfTmfEvent> getEventType() method test.
227 *
228 * @throws Exception
229 *
230 * @generatedBy CodePro at 03/05/12 2:29 PM
231 */
232 @Test
233 public void testGetEventType_1()
234 throws Exception {
235 CtfTmfTrace fixture = initTrace();
236
237 Class<CtfTmfEvent> result = fixture.getEventType();
238
239 // add additional test code here
240 // An unexpected exception was thrown in user code while executing this test:
241 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
242 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
bfe038ff 243 assertNotNull(result);
81c8e6f7
MK
244 }
245
246 /**
247 * Run the double getLocationRatio(ITmfLocation<?>) method test.
248 *
249 * @throws Exception
250 *
251 * @generatedBy CodePro at 03/05/12 2:29 PM
252 */
253 @Test
254 public void testGetLocationRatio_1()
255 throws Exception {
256 CtfTmfTrace fixture = initTrace();
0879b6b9
FC
257 CtfLocation location = new CtfLocation(Long.valueOf(1));
258 location.setLocation(Long.valueOf(1));
81c8e6f7
MK
259
260 double result = fixture.getLocationRatio(location);
261
262 // add additional test code here
263 // An unexpected exception was thrown in user code while executing this test:
264 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
265 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
266 assertEquals(Double.POSITIVE_INFINITY, result, 0.1);
267 }
268
269 /**
270 * Run the String getName() method test.
271 *
272 * @throws Exception
273 *
274 * @generatedBy CodePro at 03/05/12 2:29 PM
275 */
276 @Test
277 public void testGetName_1()
278 throws Exception {
279 CtfTmfTrace fixture = initTrace();
280
281 String result = fixture.getName();
282
283 // add additional test code here
284 // An unexpected exception was thrown in user code while executing this test:
285 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
286 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
287 assertNotNull(result);
288 }
289
290 /**
291 * Run the String getName() method test.
292 *
293 * @throws Exception
294 *
295 * @generatedBy CodePro at 03/05/12 2:29 PM
296 */
297 @Test
298 public void testGetName_2()
299 throws Exception {
300 CtfTmfTrace fixture = initTrace();
301
302 String result = fixture.getName();
303
304 // add additional test code here
305 // An unexpected exception was thrown in user code while executing this test:
306 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
307 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
308 assertNotNull(result);
309 }
310
311 /**
312 * Run the String getName() method test.
313 *
314 * @throws Exception
315 *
316 * @generatedBy CodePro at 03/05/12 2:29 PM
317 */
318 @Test
319 public void testGetName_3()
320 throws Exception {
321 CtfTmfTrace fixture = initTrace();
322
323 String result = fixture.getName();
324
325 // add additional test code here
326 // An unexpected exception was thrown in user code while executing this test:
327 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
328 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
329 assertNotNull(result);
330 }
331
332 /**
333 * Run the int getNbEnvVars() method test.
334 *
335 * @throws Exception
336 *
337 * @generatedBy CodePro at 03/05/12 2:29 PM
338 */
339 @Test
340 public void testGetNbEnvVars_1()
341 throws Exception {
342 CtfTmfTrace fixture = initTrace();
343
344 int result = fixture.getNbEnvVars();
345
346 // add additional test code here
347 // An unexpected exception was thrown in user code while executing this test:
348 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
349 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
350 assertEquals(8, result);
351 }
352
353 /**
354 * Run the long getNbEvents() method test.
355 *
356 * @throws Exception
357 *
358 * @generatedBy CodePro at 03/05/12 2:29 PM
359 */
360 @Test
361 public void testGetNbEvents_1()
362 throws Exception {
363 CtfTmfTrace fixture = initTrace();
364
365 long result = fixture.getNbEvents();
366
367 // add additional test code here
368 // An unexpected exception was thrown in user code while executing this test:
369 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
370 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
371 assertEquals(0L, result);
372 }
373
374 /**
375 * Run the CtfTmfEvent getNext(ITmfContext) method test.
376 *
377 * @throws Exception
378 *
379 * @generatedBy CodePro at 03/05/12 2:29 PM
380 */
381 @Test
382 public void testGetNext_1()
383 throws Exception {
384 CtfTmfTrace fixture = initTrace();
f474d36b 385 ITmfContext context = fixture.seekEvent(0);
81c8e6f7
MK
386
387 CtfTmfEvent result = fixture.getNext(context);
388
389 // add additional test code here
390 // An unexpected exception was thrown in user code while executing this test:
391 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
392 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
393 assertNotNull(result);
394 }
395
396 /**
397 * Run the String getPath() method test.
398 *
399 * @throws Exception
400 *
401 * @generatedBy CodePro at 03/05/12 2:29 PM
402 */
403 @Test
404 public void testGetPath_1()
405 throws Exception {
406 CtfTmfTrace fixture = initTrace();
407
408 String result = fixture.getPath();
409
410 // add additional test code here
411 // An unexpected exception was thrown in user code while executing this test:
412 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
413 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
414 assertNotNull(result);
415 }
416
417 /**
418 * Run the IResource getResource() method test.
419 *
420 * @throws Exception
421 *
422 * @generatedBy CodePro at 03/05/12 2:29 PM
423 */
424 @Test
425 public void testGetResource_1()
426 throws Exception {
427 CtfTmfTrace fixture = initTrace();
428
429 IResource result = fixture.getResource();
430
431 // add additional test code here
432 // An unexpected exception was thrown in user code while executing this test:
433 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
434 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
435 assertNull(result);
436 }
437
438 /**
439 * Run the ITmfTimestamp getStartTime() method test.
440 *
441 * @throws Exception
442 *
443 * @generatedBy CodePro at 03/05/12 2:29 PM
444 */
445 @Test
446 public void testGetStartTime_1()
447 throws Exception {
448 CtfTmfTrace fixture = initTrace();
449
450 ITmfTimestamp result = fixture.getStartTime();
451
452 // add additional test code here
453 // An unexpected exception was thrown in user code while executing this test:
454 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
455 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
456 assertNotNull(result);
457 }
458
459 /**
460 * Run the IStateSystemQuerier getStateSystem() method test.
461 *
462 * @throws Exception
463 *
464 * @generatedBy CodePro at 03/05/12 2:29 PM
465 */
466 @Test
467 public void testGetStateSystem_1()
468 throws Exception {
469 CtfTmfTrace fixture = initTrace();
470 IStateSystemQuerier result = fixture.getStateSystem();
471
472 // add additional test code here
473 // An unexpected exception was thrown in user code while executing this test:
474 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
475 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
476 assertNull(result);
477 }
478
479 /**
480 * Run the long getStreamingInterval() method test.
481 *
482 * @throws Exception
483 *
484 * @generatedBy CodePro at 03/05/12 2:29 PM
485 */
486 @Test
487 public void testGetStreamingInterval_1()
488 throws Exception {
489 CtfTmfTrace fixture = initTrace();
490
491 long result = fixture.getStreamingInterval();
492
493 // add additional test code here
494 // An unexpected exception was thrown in user code while executing this test:
495 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
496 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
497 assertEquals(0L, result);
498 }
499
500 /**
501 * Run the TmfTimeRange getTimeRange() method test.
502 *
503 * @throws Exception
504 *
505 * @generatedBy CodePro at 03/05/12 2:29 PM
506 */
507 @Test
508 public void testGetTimeRange_1()
509 throws Exception {
510 CtfTmfTrace fixture = initTrace();
511
512 TmfTimeRange result = fixture.getTimeRange();
513
514 // add additional test code here
515 // An unexpected exception was thrown in user code while executing this test:
516 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
517 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
518 assertNotNull(result);
519 }
520
521 /**
522 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
523 *
524 * @throws Exception
525 *
526 * @generatedBy CodePro at 03/05/12 2:29 PM
527 */
528 @Test
529 public void testInitTrace_1()
530 throws Exception {
531 CtfTmfTrace fixture = initTrace();
532
533 IResource resource = null;
534 String path = PATH;
535 Class<CtfTmfEvent> eventType = CtfTmfEvent.class;
536
537 fixture.initTrace(resource, path, eventType);
538
539 assertNotNull(fixture);
540 }
541
542 /**
543 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
544 *
545 * @throws Exception
546 *
547 * @generatedBy CodePro at 03/05/12 2:29 PM
548 */
549 @Test
550 public void testInitTrace_2()
551 throws Exception {
552 CtfTmfTrace fixture = initTrace();
553 IResource resource = null;
554 String path = PATH;
555 Class<CtfTmfEvent> eventType = CtfTmfEvent.class;
556
557 fixture.initTrace(resource, path, eventType);
558
559 assertNotNull(fixture);
560 }
561
562 /**
563 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
564 *
565 * @throws Exception
566 *
567 * @generatedBy CodePro at 03/05/12 2:29 PM
568 */
569 @Test
570 public void testInitTrace_3()
571 throws Exception {
572 CtfTmfTrace fixture = initTrace();
573 IResource resource = null;
574 String path = PATH;
575 Class<CtfTmfEvent> eventType = CtfTmfEvent.class;
576
577 fixture.initTrace(resource, path, eventType);
578
579 assertNotNull(fixture);
580 }
581
582 /**
583 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
584 *
585 * @throws Exception
586 *
587 * @generatedBy CodePro at 03/05/12 2:29 PM
588 */
589 @Test
590 public void testInitTrace_4()
591 throws Exception {
592 CtfTmfTrace fixture = initTrace();
593
594 IResource resource = null;
595 String path = PATH;
596 Class<CtfTmfEvent> eventType = CtfTmfEvent.class;
597
598 fixture.initTrace(resource, path, eventType);
599
600 assertNotNull(fixture);
601 }
602
603 /**
604 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
605 *
606 * @throws Exception
607 *
608 * @generatedBy CodePro at 03/05/12 2:29 PM
609 */
610 @Test
611 public void testInitTrace_5()
612 throws Exception {
613 CtfTmfTrace fixture = initTrace();
614 IResource resource = null;
615 String path = PATH;
616 Class<CtfTmfEvent> eventType = CtfTmfEvent.class;
617
618 fixture.initTrace(resource, path, eventType);
619
620 assertNotNull(fixture);
621 }
622
623 /**
624 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
625 *
626 * @throws Exception
627 *
628 * @generatedBy CodePro at 03/05/12 2:29 PM
629 */
630 @Test
631 public void testInitTrace_6()
632 throws Exception {
633 CtfTmfTrace fixture = initTrace();
634 IResource resource = null;
635 String path = PATH;
636 Class<CtfTmfEvent> eventType = CtfTmfEvent.class;
637
638 fixture.initTrace(resource, path, eventType);
639
640 assertNotNull(fixture);
641 }
642
643 /**
644 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
645 *
646 * @throws Exception
647 *
648 * @generatedBy CodePro at 03/05/12 2:29 PM
649 */
650 @Test
651 public void testInitTrace_7()
652 throws Exception {
653 CtfTmfTrace fixture = initTrace();
654 IResource resource = null;
655 String path = PATH;
656 Class<CtfTmfEvent> eventType = CtfTmfEvent.class;
657
658 fixture.initTrace(resource, path, eventType);
659
660 assertNotNull(fixture);
661 }
662
663 /**
664 * Run the CtfTmfEvent readNextEvent(ITmfContext) method test.
665 *
666 * @throws Exception
667 *
668 * @generatedBy CodePro at 03/05/12 2:29 PM
669 */
670 @Test
671 public void testReadNextEvent_1()
672 throws Exception {
673 CtfTmfTrace fixture = initTrace();
f474d36b 674 ITmfContext context = fixture.seekEvent(0);
81c8e6f7 675
c32744d6 676 CtfTmfEvent result = fixture.getNext(context);
81c8e6f7
MK
677
678 // add additional test code here
679 // An unexpected exception was thrown in user code while executing this test:
680 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
681 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
682 assertNotNull(result);
683 }
684
685 /**
686 * Run the ITmfContext seekEvent(double) method test.
687 *
688 * @throws Exception
689 *
690 * @generatedBy CodePro at 03/05/12 2:29 PM
691 */
692 @Test
693 public void testSeekEvent_1()
694 throws Exception {
695 CtfTmfTrace fixture = initTrace();
696 double ratio = 1.0;
697
698 ITmfContext result = fixture.seekEvent(ratio);
699
700 // add additional test code here
701 // An unexpected exception was thrown in user code while executing this test:
702 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
703 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
704 assertNotNull(result);
705 }
706
707 /**
708 * Run the ITmfContext seekEvent(long) method test.
709 *
710 * @throws Exception
711 *
712 * @generatedBy CodePro at 03/05/12 2:29 PM
713 */
714 @Test
715 public void testSeekEvent_2()
716 throws Exception {
717 CtfTmfTrace fixture = initTrace();
718 long rank = 1L;
719
720 ITmfContext result = fixture.seekEvent(rank);
721
722 // add additional test code here
723 // An unexpected exception was thrown in user code while executing this test:
724 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
725 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
726 assertNotNull(result);
727 }
728
729 /**
730 * Run the ITmfContext seekEvent(ITmfTimestamp) method test.
731 *
732 * @throws Exception
733 *
734 * @generatedBy CodePro at 03/05/12 2:29 PM
735 */
736 @Test
737 public void testSeekEvent_3()
738 throws Exception {
739 CtfTmfTrace fixture = initTrace();
740 ITmfTimestamp timestamp = new TmfTimestamp();
741
742 ITmfContext result = fixture.seekEvent(timestamp);
743
744 // add additional test code here
745 // An unexpected exception was thrown in user code while executing this test:
746 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
747 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
748 assertNotNull(result);
749 }
750
751// /**
752// * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
753// *
754// * @throws Exception
755// *
756// * @generatedBy CodePro at 03/05/12 2:29 PM
757// */
758// @Test
759// public void testSeekEvent_4()
760// throws Exception {
761// CtfTmfTrace fixture = initTrace();
762// fixture.setStartTime(new TmfTimestamp());
763// CtfIterator ctfIterator = new CtfIterator(new CtfTmfTrace());
764// CtfLocation ctfLocation = new CtfLocation(new Long(1L));
765// ctfLocation.setLocation(new Long(1L));
766// ctfIterator.setLocation(ctfLocation);
767// fixture.iterator = ctfIterator;
768// fixture.ss = new StateHistorySystem(new HistoryTreeBackend(new File(PATH)), true);
769// fixture.startSynch(new TmfStartSynchSignal(1));
770// fixture.fNbEvents = 1L;
771// ITmfLocation<Comparable> location = new CtfLocation(new Long(1L));
772//
773// ITmfContext result = fixture.seekEvent(location);
774//
775// // add additional test code here
776// // An unexpected exception was thrown in user code while executing this test:
777// // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
778// // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
779// assertNotNull(result);
780// }
781//
782// /**
783// * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
784// *
785// * @throws Exception
786// *
787// * @generatedBy CodePro at 03/05/12 2:29 PM
788// */
789// @Test
790// public void testSeekEvent_5()
791// throws Exception {
792// CtfTmfTrace fixture = initTrace();
793// CtfIterator ctfIterator = new CtfIterator(new CtfTmfTrace());
794// CtfLocation ctfLocation = new CtfLocation(new Long(1L));
795// ITmfContext result = fixture.seekEvent(ctfLocation);
796// assertNotNull(result);
797// }
798
799
800
801 /**
802 * Run the boolean validate(IProject,String) method test.
803 *
804 * @throws Exception
805 *
806 * @generatedBy CodePro at 03/05/12 2:29 PM
807 */
808 @Test
809 public void testValidate_1()
810 throws Exception {
811 CtfTmfTrace fixture = initTrace();
812 IProject project = null;
813 String path = PATH;
814
815 boolean result = fixture.validate(project, path);
816
817 // add additional test code here
818 // An unexpected exception was thrown in user code while executing this test:
819 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
820 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
821 assertTrue(result);
822 }
823
824 /**
825 * Run the boolean validate(IProject,String) method test.
826 *
827 * @throws Exception
828 *
829 * @generatedBy CodePro at 03/05/12 2:29 PM
830 */
831 @Test
832 public void testValidate_2()
833 throws Exception {
834 CtfTmfTrace fixture = initTrace();
835 IProject project = null;
836 String path = PATH;
837
838 boolean result = fixture.validate(project, path);
839
840 // add additional test code here
841 // An unexpected exception was thrown in user code while executing this test:
842 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
843 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
844 assertTrue(result);
845 }
846
847 /**
848 * Run the boolean validate(IProject,String) method test.
849 *
850 * @throws Exception
851 *
852 * @generatedBy CodePro at 03/05/12 2:29 PM
853 */
854 @Test
855 public void testValidate_3()
856 throws Exception {
857 CtfTmfTrace fixture = initTrace();
858 IProject project = null;
859 String path = PATH;
860
861 boolean result = fixture.validate(project, path);
862
863 // add additional test code here
864 // An unexpected exception was thrown in user code while executing this test:
865 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
866 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
867 assertTrue(result);
868 }
869
870 /**
871 * Perform pre-test initialization.
872 *
873 * @throws Exception
874 * if the initialization fails for some reason
875 *
876 * @generatedBy CodePro at 03/05/12 2:29 PM
877 */
878 @Before
879 public void setUp()
880 throws Exception {
881 // add additional set up code here
882 }
883
884 /**
885 * Perform post-test clean-up.
886 *
887 * @throws Exception
888 * if the clean-up fails for some reason
889 *
890 * @generatedBy CodePro at 03/05/12 2:29 PM
891 */
892 @After
893 public void tearDown()
894 throws Exception {
895 // Add additional tear down code here
896 }
897
898 /**
899 * Launch the test.
900 *
901 * @param args the command line arguments
902 *
903 * @generatedBy CodePro at 03/05/12 2:29 PM
904 */
905 public static void main(String[] args) {
906 new org.junit.runner.JUnitCore().run(CtfTmfTraceTest.class);
907 }
2d223a34 908}
This page took 0.060833 seconds and 5 git commands to generate.