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