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
.eclipse
.linuxtools
.tmf
.core
.trace
.TmfContext
;
26 import org
.junit
.After
;
27 import org
.junit
.Before
;
28 import org
.junit
.Test
;
31 * The class <code>CtfTmfTraceTest</code> contains tests for the class <code>{@link CtfTmfTrace}</code>.
33 * @generatedBy CodePro at 03/05/12 2:29 PM
35 * @version $Revision: 1.0 $
37 public class CtfTmfTraceTest
{
38 private static final String PATH
= TestParams
.getPath();
41 * Run the CtfTmfTrace() constructor test.
45 * @generatedBy CodePro at 03/05/12 2:29 PM
48 public void testCtfTmfTrace_1()
51 CtfTmfTrace result
= new CtfTmfTrace();
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());
66 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
70 * @generatedBy CodePro at 03/05/12 2:29 PM
73 public void testArmRequest_1()
75 CtfTmfTrace fixture
= initTrace();
76 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
78 ITmfContext result
= fixture
.armRequest(request
);
80 // add additional test code here
81 // An unexpected exception was thrown in user code while executing this test:
82 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
83 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
84 assertNotNull(result
);
90 * @throws TmfTraceException
92 private CtfTmfTrace
initTrace() throws TmfTraceException
{
93 CtfTmfTrace fixture
= new CtfTmfTrace();
94 fixture
.initTrace((IResource
) null, PATH
, CtfTmfEvent
.class);
99 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
103 * @generatedBy CodePro at 03/05/12 2:29 PM
106 public void testArmRequest_2()
108 CtfTmfTrace fixture
= initTrace();
109 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
111 ITmfContext result
= fixture
.armRequest(request
);
113 // add additional test code here
114 // An unexpected exception was thrown in user code while executing this test:
115 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
116 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
117 assertNotNull(result
);
121 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
125 * @generatedBy CodePro at 03/05/12 2:29 PM
128 public void testArmRequest_3()
130 CtfTmfTrace fixture
= initTrace();
131 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
133 ITmfContext result
= fixture
.armRequest(request
);
135 // add additional test code here
136 // An unexpected exception was thrown in user code while executing this test:
137 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
138 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
139 assertNotNull(result
);
143 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
147 * @generatedBy CodePro at 03/05/12 2:29 PM
150 public void testArmRequest_4()
152 CtfTmfTrace fixture
= initTrace();
153 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
155 ITmfContext result
= fixture
.armRequest(request
);
157 // add additional test code here
158 // An unexpected exception was thrown in user code while executing this test:
159 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
160 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
161 assertNotNull(result
);
166 * Run the void broadcast(TmfSignal) method test.
170 * @generatedBy CodePro at 03/05/12 2:29 PM
173 public void testBroadcast_1()
175 CtfTmfTrace fixture
= initTrace();
176 TmfSignal signal
= new TmfEndSynchSignal(1);
178 fixture
.broadcast(signal
);
180 // add additional test code here
181 // An unexpected exception was thrown in user code while executing this test:
182 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
183 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
188 * Run the void dispose() method test.
192 * @generatedBy CodePro at 03/05/12 2:29 PM
195 public void testDispose_1()
197 CtfTmfTrace fixture
= new CtfTmfTrace();
204 * Run the int getCacheSize() method test.
208 * @generatedBy CodePro at 03/05/12 2:29 PM
211 public void testGetCacheSize_1()
213 CtfTmfTrace fixture
= new CtfTmfTrace();
215 int result
= fixture
.getCacheSize();
217 // add additional test code here
218 // An unexpected exception was thrown in user code while executing this test:
219 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
220 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
221 assertEquals(50000, result
);
225 * Run the ITmfLocation<Comparable> getCurrentLocation() method test.
229 * @generatedBy CodePro at 03/05/12 2:29 PM
232 public void testGetCurrentLocation_1()
234 CtfTmfTrace fixture
= initTrace();
236 CtfLocation result
= (CtfLocation
) fixture
.getCurrentLocation();
238 // add additional test code here
239 // An unexpected exception was thrown in user code while executing this test:
240 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
241 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
242 assertNotNull(result
);
246 public void testSeekEventLoc_1() throws TmfTraceException
{
247 CtfTmfTrace fixture
= initTrace();
248 CtfLocation loc
= null;
249 fixture
.seekEvent(loc
);
250 assertNotNull(fixture
);
254 public void testSeekEventLoc_2() throws TmfTraceException
{
255 CtfTmfTrace fixture
= initTrace();
256 CtfLocation loc
= new CtfLocation(new CtfTmfTimestamp(0L));
257 fixture
.seekEvent(loc
);
258 assertNotNull(fixture
);
263 * Run the ITmfTimestamp getEndTime() method test.
267 * @generatedBy CodePro at 03/05/12 2:29 PM
270 public void testGetEndTime_1()
272 CtfTmfTrace fixture
= initTrace();
273 ITmfTimestamp result
= fixture
.getEndTime();
274 assertNotNull(result
);
278 * Run the String[] getEnvNames() method test.
282 * @generatedBy CodePro at 03/05/12 2:29 PM
285 public void testGetEnvNames_1()
287 CtfTmfTrace fixture
= initTrace();
289 String
[] result
= fixture
.getEnvNames();
291 // add additional test code here
292 // An unexpected exception was thrown in user code while executing this test:
293 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
294 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
295 assertNotNull(result
);
299 * Run the String getEnvValue(String) method test.
303 * @generatedBy CodePro at 03/05/12 2:29 PM
306 public void testGetEnvValue_1()
308 CtfTmfTrace fixture
= initTrace();
309 String key
= "tracer_name"; //$NON-NLS-1$
311 String result
= fixture
.getEnvValue(key
);
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 assertEquals("\"lttng-modules\"",result
); //$NON-NLS-1$
321 * Run the Class<CtfTmfEvent> getEventType() method test.
325 * @generatedBy CodePro at 03/05/12 2:29 PM
328 public void testGetEventType_1()
330 CtfTmfTrace fixture
= initTrace();
332 Class
<CtfTmfEvent
> result
= fixture
.getEventType();
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)
342 * Run the double getLocationRatio(ITmfLocation<?>) method test.
346 * @generatedBy CodePro at 03/05/12 2:29 PM
349 public void testGetLocationRatio_1()
351 CtfTmfTrace fixture
= initTrace();
352 CtfLocation location
= new CtfLocation(new Long(1L));
353 location
.setLocation(new Long(1L));
355 double result
= fixture
.getLocationRatio(location
);
357 // add additional test code here
358 // An unexpected exception was thrown in user code while executing this test:
359 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
360 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
361 assertEquals(Double
.POSITIVE_INFINITY
, result
, 0.1);
365 * Run the String getName() method test.
369 * @generatedBy CodePro at 03/05/12 2:29 PM
372 public void testGetName_1()
374 CtfTmfTrace fixture
= initTrace();
376 String result
= fixture
.getName();
378 // add additional test code here
379 // An unexpected exception was thrown in user code while executing this test:
380 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
381 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
382 assertNotNull(result
);
386 * Run the String getName() method test.
390 * @generatedBy CodePro at 03/05/12 2:29 PM
393 public void testGetName_2()
395 CtfTmfTrace fixture
= initTrace();
397 String result
= fixture
.getName();
399 // add additional test code here
400 // An unexpected exception was thrown in user code while executing this test:
401 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
402 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
403 assertNotNull(result
);
407 * Run the String getName() method test.
411 * @generatedBy CodePro at 03/05/12 2:29 PM
414 public void testGetName_3()
416 CtfTmfTrace fixture
= initTrace();
418 String result
= fixture
.getName();
420 // add additional test code here
421 // An unexpected exception was thrown in user code while executing this test:
422 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
423 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
424 assertNotNull(result
);
428 * Run the int getNbEnvVars() method test.
432 * @generatedBy CodePro at 03/05/12 2:29 PM
435 public void testGetNbEnvVars_1()
437 CtfTmfTrace fixture
= initTrace();
439 int result
= fixture
.getNbEnvVars();
441 // add additional test code here
442 // An unexpected exception was thrown in user code while executing this test:
443 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
444 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
445 assertEquals(8, result
);
449 * Run the long getNbEvents() method test.
453 * @generatedBy CodePro at 03/05/12 2:29 PM
456 public void testGetNbEvents_1()
458 CtfTmfTrace fixture
= initTrace();
460 long result
= fixture
.getNbEvents();
462 // add additional test code here
463 // An unexpected exception was thrown in user code while executing this test:
464 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
465 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
466 assertEquals(0L, result
);
470 * Run the CtfTmfEvent getNext(ITmfContext) method test.
474 * @generatedBy CodePro at 03/05/12 2:29 PM
477 public void testGetNext_1()
479 CtfTmfTrace fixture
= initTrace();
480 ITmfContext context
= new TmfContext();
482 CtfTmfEvent result
= fixture
.getNext(context
);
484 // add additional test code here
485 // An unexpected exception was thrown in user code while executing this test:
486 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
487 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
488 assertNotNull(result
);
492 * Run the String getPath() method test.
496 * @generatedBy CodePro at 03/05/12 2:29 PM
499 public void testGetPath_1()
501 CtfTmfTrace fixture
= initTrace();
503 String result
= fixture
.getPath();
505 // add additional test code here
506 // An unexpected exception was thrown in user code while executing this test:
507 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
508 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
509 assertNotNull(result
);
513 * Run the IResource getResource() method test.
517 * @generatedBy CodePro at 03/05/12 2:29 PM
520 public void testGetResource_1()
522 CtfTmfTrace fixture
= initTrace();
524 IResource result
= fixture
.getResource();
526 // add additional test code here
527 // An unexpected exception was thrown in user code while executing this test:
528 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
529 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
534 * Run the ITmfTimestamp getStartTime() method test.
538 * @generatedBy CodePro at 03/05/12 2:29 PM
541 public void testGetStartTime_1()
543 CtfTmfTrace fixture
= initTrace();
545 ITmfTimestamp result
= fixture
.getStartTime();
547 // add additional test code here
548 // An unexpected exception was thrown in user code while executing this test:
549 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
550 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
551 assertNotNull(result
);
555 * Run the IStateSystemQuerier getStateSystem() method test.
559 * @generatedBy CodePro at 03/05/12 2:29 PM
562 public void testGetStateSystem_1()
564 CtfTmfTrace fixture
= initTrace();
565 IStateSystemQuerier result
= fixture
.getStateSystem();
567 // add additional test code here
568 // An unexpected exception was thrown in user code while executing this test:
569 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
570 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
575 * Run the long getStreamingInterval() method test.
579 * @generatedBy CodePro at 03/05/12 2:29 PM
582 public void testGetStreamingInterval_1()
584 CtfTmfTrace fixture
= initTrace();
586 long result
= fixture
.getStreamingInterval();
588 // add additional test code here
589 // An unexpected exception was thrown in user code while executing this test:
590 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
591 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
592 assertEquals(0L, result
);
596 * Run the TmfTimeRange getTimeRange() method test.
600 * @generatedBy CodePro at 03/05/12 2:29 PM
603 public void testGetTimeRange_1()
605 CtfTmfTrace fixture
= initTrace();
607 TmfTimeRange result
= fixture
.getTimeRange();
609 // add additional test code here
610 // An unexpected exception was thrown in user code while executing this test:
611 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
612 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
613 assertNotNull(result
);
617 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
621 * @generatedBy CodePro at 03/05/12 2:29 PM
624 public void testInitTrace_1()
626 CtfTmfTrace fixture
= initTrace();
628 IResource resource
= null;
630 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
632 fixture
.initTrace(resource
, path
, eventType
);
634 assertNotNull(fixture
);
638 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
642 * @generatedBy CodePro at 03/05/12 2:29 PM
645 public void testInitTrace_2()
647 CtfTmfTrace fixture
= initTrace();
648 IResource resource
= null;
650 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
652 fixture
.initTrace(resource
, path
, eventType
);
654 assertNotNull(fixture
);
658 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
662 * @generatedBy CodePro at 03/05/12 2:29 PM
665 public void testInitTrace_3()
667 CtfTmfTrace fixture
= initTrace();
668 IResource resource
= null;
670 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
672 fixture
.initTrace(resource
, path
, eventType
);
674 assertNotNull(fixture
);
678 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
682 * @generatedBy CodePro at 03/05/12 2:29 PM
685 public void testInitTrace_4()
687 CtfTmfTrace fixture
= initTrace();
689 IResource resource
= null;
691 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
693 fixture
.initTrace(resource
, path
, eventType
);
695 assertNotNull(fixture
);
699 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
703 * @generatedBy CodePro at 03/05/12 2:29 PM
706 public void testInitTrace_5()
708 CtfTmfTrace fixture
= initTrace();
709 IResource resource
= null;
711 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
713 fixture
.initTrace(resource
, path
, eventType
);
715 assertNotNull(fixture
);
719 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
723 * @generatedBy CodePro at 03/05/12 2:29 PM
726 public void testInitTrace_6()
728 CtfTmfTrace fixture
= initTrace();
729 IResource resource
= null;
731 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
733 fixture
.initTrace(resource
, path
, eventType
);
735 assertNotNull(fixture
);
739 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
743 * @generatedBy CodePro at 03/05/12 2:29 PM
746 public void testInitTrace_7()
748 CtfTmfTrace fixture
= initTrace();
749 IResource resource
= null;
751 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
753 fixture
.initTrace(resource
, path
, eventType
);
755 assertNotNull(fixture
);
759 * Run the CtfTmfEvent readNextEvent(ITmfContext) method test.
763 * @generatedBy CodePro at 03/05/12 2:29 PM
766 public void testReadNextEvent_1()
768 CtfTmfTrace fixture
= initTrace();
769 ITmfContext context
= new TmfContext();
771 CtfTmfEvent result
= fixture
.readNextEvent(context
);
773 // add additional test code here
774 // An unexpected exception was thrown in user code while executing this test:
775 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
776 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
777 assertNotNull(result
);
781 * Run the ITmfContext seekEvent(double) method test.
785 * @generatedBy CodePro at 03/05/12 2:29 PM
788 public void testSeekEvent_1()
790 CtfTmfTrace fixture
= initTrace();
793 ITmfContext result
= fixture
.seekEvent(ratio
);
795 // add additional test code here
796 // An unexpected exception was thrown in user code while executing this test:
797 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
798 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
799 assertNotNull(result
);
803 * Run the ITmfContext seekEvent(long) method test.
807 * @generatedBy CodePro at 03/05/12 2:29 PM
810 public void testSeekEvent_2()
812 CtfTmfTrace fixture
= initTrace();
815 ITmfContext result
= fixture
.seekEvent(rank
);
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 assertNotNull(result
);
825 * Run the ITmfContext seekEvent(ITmfTimestamp) method test.
829 * @generatedBy CodePro at 03/05/12 2:29 PM
832 public void testSeekEvent_3()
834 CtfTmfTrace fixture
= initTrace();
835 ITmfTimestamp timestamp
= new TmfTimestamp();
837 ITmfContext result
= fixture
.seekEvent(timestamp
);
839 // add additional test code here
840 // An unexpected exception was thrown in user code while executing this test:
841 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
842 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
843 assertNotNull(result
);
847 // * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
849 // * @throws Exception
851 // * @generatedBy CodePro at 03/05/12 2:29 PM
854 // public void testSeekEvent_4()
855 // throws Exception {
856 // CtfTmfTrace fixture = initTrace();
857 // fixture.setStartTime(new TmfTimestamp());
858 // CtfIterator ctfIterator = new CtfIterator(new CtfTmfTrace());
859 // CtfLocation ctfLocation = new CtfLocation(new Long(1L));
860 // ctfLocation.setLocation(new Long(1L));
861 // ctfIterator.setLocation(ctfLocation);
862 // fixture.iterator = ctfIterator;
863 // fixture.ss = new StateHistorySystem(new HistoryTreeBackend(new File(PATH)), true);
864 // fixture.startSynch(new TmfStartSynchSignal(1));
865 // fixture.fNbEvents = 1L;
866 // ITmfLocation<Comparable> location = new CtfLocation(new Long(1L));
868 // ITmfContext result = fixture.seekEvent(location);
870 // // add additional test code here
871 // // An unexpected exception was thrown in user code while executing this test:
872 // // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
873 // // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
874 // assertNotNull(result);
878 // * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
880 // * @throws Exception
882 // * @generatedBy CodePro at 03/05/12 2:29 PM
885 // public void testSeekEvent_5()
886 // throws Exception {
887 // CtfTmfTrace fixture = initTrace();
888 // CtfIterator ctfIterator = new CtfIterator(new CtfTmfTrace());
889 // CtfLocation ctfLocation = new CtfLocation(new Long(1L));
890 // ITmfContext result = fixture.seekEvent(ctfLocation);
891 // assertNotNull(result);
897 * Run the boolean validate(IProject,String) method test.
901 * @generatedBy CodePro at 03/05/12 2:29 PM
904 public void testValidate_1()
906 CtfTmfTrace fixture
= initTrace();
907 IProject project
= null;
910 boolean result
= fixture
.validate(project
, path
);
912 // add additional test code here
913 // An unexpected exception was thrown in user code while executing this test:
914 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
915 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
920 * Run the boolean validate(IProject,String) method test.
924 * @generatedBy CodePro at 03/05/12 2:29 PM
927 public void testValidate_2()
929 CtfTmfTrace fixture
= initTrace();
930 IProject project
= null;
933 boolean result
= fixture
.validate(project
, path
);
935 // add additional test code here
936 // An unexpected exception was thrown in user code while executing this test:
937 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
938 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
943 * Run the boolean validate(IProject,String) method test.
947 * @generatedBy CodePro at 03/05/12 2:29 PM
950 public void testValidate_3()
952 CtfTmfTrace fixture
= initTrace();
953 IProject project
= null;
956 boolean result
= fixture
.validate(project
, path
);
958 // add additional test code here
959 // An unexpected exception was thrown in user code while executing this test:
960 // org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException: Path must be a valid directory
961 // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace.initTrace(CtfTmfTrace.java:98)
966 * Perform pre-test initialization.
969 * if the initialization fails for some reason
971 * @generatedBy CodePro at 03/05/12 2:29 PM
976 // add additional set up code here
980 * Perform post-test clean-up.
983 * if the clean-up fails for some reason
985 * @generatedBy CodePro at 03/05/12 2:29 PM
988 public void tearDown()
990 // Add additional tear down code here
996 * @param args the command line arguments
998 * @generatedBy CodePro at 03/05/12 2:29 PM
1000 public static void main(String
[] args
) {
1001 new org
.junit
.runner
.JUnitCore().run(CtfTmfTraceTest
.class);