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