1 package org
.eclipse
.linuxtools
.tmf
.core
.tests
.ctfadaptor
;
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
;
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
.ITmfEvent
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfTimestamp
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimeRange
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.TmfTraceException
;
19 import org
.eclipse
.linuxtools
.tmf
.core
.request
.ITmfDataRequest
;
20 import org
.eclipse
.linuxtools
.tmf
.core
.request
.TmfCoalescedEventRequest
;
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
;
30 * The class <code>CtfTmfTraceTest</code> contains tests for the class <code>{@link CtfTmfTrace}</code>.
32 * @generatedBy CodePro at 03/05/12 2:29 PM
34 * @version $Revision: 1.0 $
36 public class CtfTmfTraceTest
{
37 private static final String PATH
= TestParams
.getPath();
40 * Run the CtfTmfTrace() constructor test.
44 * @generatedBy CodePro at 03/05/12 2:29 PM
47 public void testCtfTmfTrace_1()
50 CtfTmfTrace result
= new CtfTmfTrace();
52 // add additional test code here
53 assertNotNull(result
);
54 assertEquals(null, result
.getEventType());
55 assertEquals(50000, result
.getCacheSize());
56 assertEquals(0L, result
.getNbEvents());
57 assertEquals(0L, result
.getStreamingInterval());
58 assertEquals(null, result
.getStateSystem());
59 assertEquals(null, result
.getResource());
60 assertEquals(1000, result
.getQueueSize());
61 assertEquals(null, result
.getType());
65 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
69 * @generatedBy CodePro at 03/05/12 2:29 PM
72 public void testArmRequest_1()
74 CtfTmfTrace fixture
= initTrace();
75 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
77 ITmfContext result
= fixture
.armRequest(request
);
79 // add additional test code here
80 // An unexpected exception was thrown in user code while executing this test:
81 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
82 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
83 assertNotNull(result
);
89 * @throws TmfTraceException
91 private CtfTmfTrace
initTrace() throws TmfTraceException
{
92 CtfTmfTrace fixture
= new CtfTmfTrace();
93 fixture
.initTrace((IResource
) null, PATH
, CtfTmfEvent
.class);
98 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
102 * @generatedBy CodePro at 03/05/12 2:29 PM
105 public void testArmRequest_2()
107 CtfTmfTrace fixture
= initTrace();
108 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
110 ITmfContext result
= fixture
.armRequest(request
);
112 // add additional test code here
113 // An unexpected exception was thrown in user code while executing this test:
114 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
115 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
116 assertNotNull(result
);
120 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
124 * @generatedBy CodePro at 03/05/12 2:29 PM
127 public void testArmRequest_3()
129 CtfTmfTrace fixture
= initTrace();
130 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
132 ITmfContext result
= fixture
.armRequest(request
);
134 // add additional test code here
135 // An unexpected exception was thrown in user code while executing this test:
136 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
137 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
138 assertNotNull(result
);
142 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
146 * @generatedBy CodePro at 03/05/12 2:29 PM
149 public void testArmRequest_4()
151 CtfTmfTrace fixture
= initTrace();
152 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
154 ITmfContext result
= fixture
.armRequest(request
);
156 // add additional test code here
157 // An unexpected exception was thrown in user code while executing this test:
158 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
159 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
160 assertNotNull(result
);
165 * Run the void broadcast(TmfSignal) method test.
169 * @generatedBy CodePro at 03/05/12 2:29 PM
172 public void testBroadcast_1()
174 CtfTmfTrace fixture
= initTrace();
175 TmfSignal signal
= new TmfEndSynchSignal(1);
177 fixture
.broadcast(signal
);
179 // add additional test code here
180 // An unexpected exception was thrown in user code while executing this test:
181 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
182 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
187 * Run the void dispose() method test.
191 * @generatedBy CodePro at 03/05/12 2:29 PM
194 public void testDispose_1()
196 CtfTmfTrace fixture
= new CtfTmfTrace();
203 * Run the int getCacheSize() method test.
207 * @generatedBy CodePro at 03/05/12 2:29 PM
210 public void testGetCacheSize_1()
212 CtfTmfTrace fixture
= new CtfTmfTrace();
214 int result
= fixture
.getCacheSize();
216 // add additional test code here
217 // An unexpected exception was thrown in user code while executing this test:
218 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
219 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
220 assertEquals(50000, result
);
224 * Run the ITmfLocation<Comparable> getCurrentLocation() method test.
228 * @generatedBy CodePro at 03/05/12 2:29 PM
231 public void testGetCurrentLocation_1()
233 CtfTmfTrace fixture
= initTrace();
235 CtfLocation result
= (CtfLocation
) fixture
.getCurrentLocation();
237 // add additional test code here
238 // An unexpected exception was thrown in user code while executing this test:
239 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
240 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
245 public void testSeekEventLoc_1() throws TmfTraceException
{
246 CtfTmfTrace fixture
= initTrace();
247 CtfLocation loc
= null;
248 fixture
.seekEvent(loc
);
249 assertNotNull(fixture
);
253 public void testSeekEventLoc_2() throws TmfTraceException
{
254 CtfTmfTrace fixture
= initTrace();
255 CtfLocation loc
= new CtfLocation(new CtfTmfTimestamp(0L));
256 fixture
.seekEvent(loc
);
257 assertNotNull(fixture
);
262 * Run the ITmfTimestamp getEndTime() method test.
266 * @generatedBy CodePro at 03/05/12 2:29 PM
269 public void testGetEndTime_1()
271 CtfTmfTrace fixture
= initTrace();
272 ITmfTimestamp result
= fixture
.getEndTime();
273 assertNotNull(result
);
277 * Run the String[] getEnvNames() method test.
281 * @generatedBy CodePro at 03/05/12 2:29 PM
284 public void testGetEnvNames_1()
286 CtfTmfTrace fixture
= initTrace();
288 String
[] result
= fixture
.getEnvNames();
290 // add additional test code here
291 // An unexpected exception was thrown in user code while executing this test:
292 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
293 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
294 assertNotNull(result
);
298 * Run the String getEnvValue(String) method test.
302 * @generatedBy CodePro at 03/05/12 2:29 PM
305 public void testGetEnvValue_1()
307 CtfTmfTrace fixture
= initTrace();
308 String key
= "tracer_name"; //$NON-NLS-1$
310 String result
= fixture
.getEnvValue(key
);
312 // add additional test code here
313 // An unexpected exception was thrown in user code while executing this test:
314 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
315 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
316 assertEquals("\"lttng-modules\"",result
); //$NON-NLS-1$
320 * Run the Class<CtfTmfEvent> getEventType() method test.
324 * @generatedBy CodePro at 03/05/12 2:29 PM
327 public void testGetEventType_1()
329 CtfTmfTrace fixture
= initTrace();
331 Class
<CtfTmfEvent
> result
= fixture
.getEventType();
333 // add additional test code here
334 // An unexpected exception was thrown in user code while executing this test:
335 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
336 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
341 * Run the double getLocationRatio(ITmfLocation<?>) method test.
345 * @generatedBy CodePro at 03/05/12 2:29 PM
348 public void testGetLocationRatio_1()
350 CtfTmfTrace fixture
= initTrace();
351 CtfLocation location
= new CtfLocation(new Long(1L));
352 location
.setLocation(new Long(1L));
354 double result
= fixture
.getLocationRatio(location
);
356 // add additional test code here
357 // An unexpected exception was thrown in user code while executing this test:
358 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
359 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
360 assertEquals(Double
.POSITIVE_INFINITY
, result
, 0.1);
364 * Run the String getName() method test.
368 * @generatedBy CodePro at 03/05/12 2:29 PM
371 public void testGetName_1()
373 CtfTmfTrace fixture
= initTrace();
375 String result
= fixture
.getName();
377 // add additional test code here
378 // An unexpected exception was thrown in user code while executing this test:
379 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
380 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
381 assertNotNull(result
);
385 * Run the String getName() method test.
389 * @generatedBy CodePro at 03/05/12 2:29 PM
392 public void testGetName_2()
394 CtfTmfTrace fixture
= initTrace();
396 String result
= fixture
.getName();
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
);
406 * Run the String getName() method test.
410 * @generatedBy CodePro at 03/05/12 2:29 PM
413 public void testGetName_3()
415 CtfTmfTrace fixture
= initTrace();
417 String result
= fixture
.getName();
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
);
427 * Run the int getNbEnvVars() method test.
431 * @generatedBy CodePro at 03/05/12 2:29 PM
434 public void testGetNbEnvVars_1()
436 CtfTmfTrace fixture
= initTrace();
438 int result
= fixture
.getNbEnvVars();
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 assertEquals(8, result
);
448 * Run the long getNbEvents() method test.
452 * @generatedBy CodePro at 03/05/12 2:29 PM
455 public void testGetNbEvents_1()
457 CtfTmfTrace fixture
= initTrace();
459 long result
= fixture
.getNbEvents();
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 assertEquals(0L, result
);
469 * Run the CtfTmfEvent getNext(ITmfContext) method test.
473 * @generatedBy CodePro at 03/05/12 2:29 PM
476 public void testGetNext_1()
478 CtfTmfTrace fixture
= initTrace();
479 ITmfContext context
= fixture
.seekEvent(0);
481 CtfTmfEvent result
= fixture
.getNext(context
);
483 // add additional test code here
484 // An unexpected exception was thrown in user code while executing this test:
485 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
486 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
487 assertNotNull(result
);
491 * Run the String getPath() method test.
495 * @generatedBy CodePro at 03/05/12 2:29 PM
498 public void testGetPath_1()
500 CtfTmfTrace fixture
= initTrace();
502 String result
= fixture
.getPath();
504 // add additional test code here
505 // An unexpected exception was thrown in user code while executing this test:
506 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
507 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
508 assertNotNull(result
);
512 * Run the IResource getResource() method test.
516 * @generatedBy CodePro at 03/05/12 2:29 PM
519 public void testGetResource_1()
521 CtfTmfTrace fixture
= initTrace();
523 IResource result
= fixture
.getResource();
525 // add additional test code here
526 // An unexpected exception was thrown in user code while executing this test:
527 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
528 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
533 * Run the ITmfTimestamp getStartTime() method test.
537 * @generatedBy CodePro at 03/05/12 2:29 PM
540 public void testGetStartTime_1()
542 CtfTmfTrace fixture
= initTrace();
544 ITmfTimestamp result
= fixture
.getStartTime();
546 // add additional test code here
547 // An unexpected exception was thrown in user code while executing this test:
548 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
549 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
550 assertNotNull(result
);
554 * Run the IStateSystemQuerier getStateSystem() method test.
558 * @generatedBy CodePro at 03/05/12 2:29 PM
561 public void testGetStateSystem_1()
563 CtfTmfTrace fixture
= initTrace();
564 IStateSystemQuerier result
= fixture
.getStateSystem();
566 // add additional test code here
567 // An unexpected exception was thrown in user code while executing this test:
568 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
569 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
574 * Run the long getStreamingInterval() method test.
578 * @generatedBy CodePro at 03/05/12 2:29 PM
581 public void testGetStreamingInterval_1()
583 CtfTmfTrace fixture
= initTrace();
585 long result
= fixture
.getStreamingInterval();
587 // add additional test code here
588 // An unexpected exception was thrown in user code while executing this test:
589 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
590 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
591 assertEquals(0L, result
);
595 * Run the TmfTimeRange getTimeRange() method test.
599 * @generatedBy CodePro at 03/05/12 2:29 PM
602 public void testGetTimeRange_1()
604 CtfTmfTrace fixture
= initTrace();
606 TmfTimeRange result
= fixture
.getTimeRange();
608 // add additional test code here
609 // An unexpected exception was thrown in user code while executing this test:
610 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
611 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
612 assertNotNull(result
);
616 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
620 * @generatedBy CodePro at 03/05/12 2:29 PM
623 public void testInitTrace_1()
625 CtfTmfTrace fixture
= initTrace();
627 IResource resource
= null;
629 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
631 fixture
.initTrace(resource
, path
, eventType
);
633 assertNotNull(fixture
);
637 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
641 * @generatedBy CodePro at 03/05/12 2:29 PM
644 public void testInitTrace_2()
646 CtfTmfTrace fixture
= initTrace();
647 IResource resource
= null;
649 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
651 fixture
.initTrace(resource
, path
, eventType
);
653 assertNotNull(fixture
);
657 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
661 * @generatedBy CodePro at 03/05/12 2:29 PM
664 public void testInitTrace_3()
666 CtfTmfTrace fixture
= initTrace();
667 IResource resource
= null;
669 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
671 fixture
.initTrace(resource
, path
, eventType
);
673 assertNotNull(fixture
);
677 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
681 * @generatedBy CodePro at 03/05/12 2:29 PM
684 public void testInitTrace_4()
686 CtfTmfTrace fixture
= initTrace();
688 IResource resource
= null;
690 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
692 fixture
.initTrace(resource
, path
, eventType
);
694 assertNotNull(fixture
);
698 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
702 * @generatedBy CodePro at 03/05/12 2:29 PM
705 public void testInitTrace_5()
707 CtfTmfTrace fixture
= initTrace();
708 IResource resource
= null;
710 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
712 fixture
.initTrace(resource
, path
, eventType
);
714 assertNotNull(fixture
);
718 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
722 * @generatedBy CodePro at 03/05/12 2:29 PM
725 public void testInitTrace_6()
727 CtfTmfTrace fixture
= initTrace();
728 IResource resource
= null;
730 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
732 fixture
.initTrace(resource
, path
, eventType
);
734 assertNotNull(fixture
);
738 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
742 * @generatedBy CodePro at 03/05/12 2:29 PM
745 public void testInitTrace_7()
747 CtfTmfTrace fixture
= initTrace();
748 IResource resource
= null;
750 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
752 fixture
.initTrace(resource
, path
, eventType
);
754 assertNotNull(fixture
);
758 * Run the CtfTmfEvent readNextEvent(ITmfContext) method test.
762 * @generatedBy CodePro at 03/05/12 2:29 PM
765 public void testReadNextEvent_1()
767 CtfTmfTrace fixture
= initTrace();
768 ITmfContext context
= fixture
.seekEvent(0);
770 CtfTmfEvent result
= fixture
.readNextEvent(context
);
772 // add additional test code here
773 // An unexpected exception was thrown in user code while executing this test:
774 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
775 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
776 assertNotNull(result
);
780 * Run the ITmfContext seekEvent(double) method test.
784 * @generatedBy CodePro at 03/05/12 2:29 PM
787 public void testSeekEvent_1()
789 CtfTmfTrace fixture
= initTrace();
792 ITmfContext result
= fixture
.seekEvent(ratio
);
794 // add additional test code here
795 // An unexpected exception was thrown in user code while executing this test:
796 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
797 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
798 assertNotNull(result
);
802 * Run the ITmfContext seekEvent(long) method test.
806 * @generatedBy CodePro at 03/05/12 2:29 PM
809 public void testSeekEvent_2()
811 CtfTmfTrace fixture
= initTrace();
814 ITmfContext result
= fixture
.seekEvent(rank
);
816 // add additional test code here
817 // An unexpected exception was thrown in user code while executing this test:
818 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
819 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
820 assertNotNull(result
);
824 * Run the ITmfContext seekEvent(ITmfTimestamp) method test.
828 * @generatedBy CodePro at 03/05/12 2:29 PM
831 public void testSeekEvent_3()
833 CtfTmfTrace fixture
= initTrace();
834 ITmfTimestamp timestamp
= new TmfTimestamp();
836 ITmfContext result
= fixture
.seekEvent(timestamp
);
838 // add additional test code here
839 // An unexpected exception was thrown in user code while executing this test:
840 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
841 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
842 assertNotNull(result
);
846 // * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
848 // * @throws Exception
850 // * @generatedBy CodePro at 03/05/12 2:29 PM
853 // public void testSeekEvent_4()
854 // throws Exception {
855 // CtfTmfTrace fixture = initTrace();
856 // fixture.setStartTime(new TmfTimestamp());
857 // CtfIterator ctfIterator = new CtfIterator(new CtfTmfTrace());
858 // CtfLocation ctfLocation = new CtfLocation(new Long(1L));
859 // ctfLocation.setLocation(new Long(1L));
860 // ctfIterator.setLocation(ctfLocation);
861 // fixture.iterator = ctfIterator;
862 // fixture.ss = new StateHistorySystem(new HistoryTreeBackend(new File(PATH)), true);
863 // fixture.startSynch(new TmfStartSynchSignal(1));
864 // fixture.fNbEvents = 1L;
865 // ITmfLocation<Comparable> location = new CtfLocation(new Long(1L));
867 // ITmfContext result = fixture.seekEvent(location);
869 // // add additional test code here
870 // // An unexpected exception was thrown in user code while executing this test:
871 // // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
872 // // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
873 // assertNotNull(result);
877 // * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
879 // * @throws Exception
881 // * @generatedBy CodePro at 03/05/12 2:29 PM
884 // public void testSeekEvent_5()
885 // throws Exception {
886 // CtfTmfTrace fixture = initTrace();
887 // CtfIterator ctfIterator = new CtfIterator(new CtfTmfTrace());
888 // CtfLocation ctfLocation = new CtfLocation(new Long(1L));
889 // ITmfContext result = fixture.seekEvent(ctfLocation);
890 // assertNotNull(result);
896 * Run the boolean validate(IProject,String) method test.
900 * @generatedBy CodePro at 03/05/12 2:29 PM
903 public void testValidate_1()
905 CtfTmfTrace fixture
= initTrace();
906 IProject project
= null;
909 boolean result
= fixture
.validate(project
, path
);
911 // add additional test code here
912 // An unexpected exception was thrown in user code while executing this test:
913 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
914 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
919 * Run the boolean validate(IProject,String) method test.
923 * @generatedBy CodePro at 03/05/12 2:29 PM
926 public void testValidate_2()
928 CtfTmfTrace fixture
= initTrace();
929 IProject project
= null;
932 boolean result
= fixture
.validate(project
, path
);
934 // add additional test code here
935 // An unexpected exception was thrown in user code while executing this test:
936 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
937 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
942 * Run the boolean validate(IProject,String) method test.
946 * @generatedBy CodePro at 03/05/12 2:29 PM
949 public void testValidate_3()
951 CtfTmfTrace fixture
= initTrace();
952 IProject project
= null;
955 boolean result
= fixture
.validate(project
, path
);
957 // add additional test code here
958 // An unexpected exception was thrown in user code while executing this test:
959 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
960 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
965 * Perform pre-test initialization.
968 * if the initialization fails for some reason
970 * @generatedBy CodePro at 03/05/12 2:29 PM
975 // add additional set up code here
979 * Perform post-test clean-up.
982 * if the clean-up fails for some reason
984 * @generatedBy CodePro at 03/05/12 2:29 PM
987 public void tearDown()
989 // Add additional tear down code here
995 * @param args the command line arguments
997 * @generatedBy CodePro at 03/05/12 2:29 PM
999 public static void main(String
[] args
) {
1000 new org
.junit
.runner
.JUnitCore().run(CtfTmfTraceTest
.class);