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
.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
;
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 @SuppressWarnings("restriction")
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 @SuppressWarnings({ "rawtypes", "unchecked" })
77 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
79 ITmfContext result
= fixture
.armRequest(request
);
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
);
91 * @throws TmfTraceException
93 private CtfTmfTrace
initTrace() throws TmfTraceException
{
94 CtfTmfTrace fixture
= new CtfTmfTrace();
95 fixture
.initTrace((IResource
) null, PATH
, CtfTmfEvent
.class);
100 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
104 * @generatedBy CodePro at 03/05/12 2:29 PM
107 public void testArmRequest_2()
109 CtfTmfTrace fixture
= initTrace();
110 @SuppressWarnings({ "rawtypes", "unchecked" })
111 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
113 ITmfContext result
= fixture
.armRequest(request
);
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
);
123 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
127 * @generatedBy CodePro at 03/05/12 2:29 PM
130 public void testArmRequest_3()
132 CtfTmfTrace fixture
= initTrace();
133 @SuppressWarnings({ "rawtypes", "unchecked" })
134 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
136 ITmfContext result
= fixture
.armRequest(request
);
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
);
146 * Run the ITmfContext armRequest(ITmfDataRequest<CtfTmfEvent>) method test.
150 * @generatedBy CodePro at 03/05/12 2:29 PM
153 public void testArmRequest_4()
155 CtfTmfTrace fixture
= initTrace();
156 @SuppressWarnings({ "rawtypes", "unchecked" })
157 ITmfDataRequest
<CtfTmfEvent
> request
= new TmfCoalescedEventRequest(ITmfEvent
.class);
159 ITmfContext result
= fixture
.armRequest(request
);
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
);
170 * Run the void broadcast(TmfSignal) method test.
174 * @generatedBy CodePro at 03/05/12 2:29 PM
177 public void testBroadcast_1()
179 CtfTmfTrace fixture
= initTrace();
180 TmfSignal signal
= new TmfEndSynchSignal(1);
182 fixture
.broadcast(signal
);
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)
192 * Run the void dispose() method test.
196 * @generatedBy CodePro at 03/05/12 2:29 PM
199 public void testDispose_1()
201 CtfTmfTrace fixture
= new CtfTmfTrace();
208 * Run the int getCacheSize() method test.
212 * @generatedBy CodePro at 03/05/12 2:29 PM
215 public void testGetCacheSize_1()
217 CtfTmfTrace fixture
= new CtfTmfTrace();
219 int result
= fixture
.getCacheSize();
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
);
229 * Run the ITmfLocation<Comparable> getCurrentLocation() method test.
233 * @generatedBy CodePro at 03/05/12 2:29 PM
236 public void testGetCurrentLocation_1()
238 CtfTmfTrace fixture
= initTrace();
240 CtfLocation result
= (CtfLocation
) fixture
.getCurrentLocation();
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)
250 public void testSeekEventLoc_1() throws TmfTraceException
{
251 CtfTmfTrace fixture
= initTrace();
252 CtfLocation loc
= null;
253 fixture
.seekEvent(loc
);
254 assertNotNull(fixture
);
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
);
267 * Run the ITmfTimestamp getEndTime() method test.
271 * @generatedBy CodePro at 03/05/12 2:29 PM
274 public void testGetEndTime_1()
276 CtfTmfTrace fixture
= initTrace();
277 ITmfTimestamp result
= fixture
.getEndTime();
278 assertNotNull(result
);
282 * Run the String[] getEnvNames() method test.
286 * @generatedBy CodePro at 03/05/12 2:29 PM
289 public void testGetEnvNames_1()
291 CtfTmfTrace fixture
= initTrace();
293 String
[] result
= fixture
.getEnvNames();
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
);
303 * Run the String getEnvValue(String) method test.
307 * @generatedBy CodePro at 03/05/12 2:29 PM
310 public void testGetEnvValue_1()
312 CtfTmfTrace fixture
= initTrace();
313 String key
= "tracer_name"; //$NON-NLS-1$
315 String result
= fixture
.getEnvValue(key
);
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$
325 * Run the Class<CtfTmfEvent> getEventType() method test.
329 * @generatedBy CodePro at 03/05/12 2:29 PM
332 public void testGetEventType_1()
334 CtfTmfTrace fixture
= initTrace();
336 Class
<CtfTmfEvent
> result
= fixture
.getEventType();
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)
346 * Run the double getLocationRatio(ITmfLocation<?>) method test.
350 * @generatedBy CodePro at 03/05/12 2:29 PM
353 public void testGetLocationRatio_1()
355 CtfTmfTrace fixture
= initTrace();
356 CtfLocation location
= new CtfLocation(Long
.valueOf(1));
357 location
.setLocation(Long
.valueOf(1));
359 double result
= fixture
.getLocationRatio(location
);
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);
369 * Run the String getName() method test.
373 * @generatedBy CodePro at 03/05/12 2:29 PM
376 public void testGetName_1()
378 CtfTmfTrace fixture
= initTrace();
380 String result
= fixture
.getName();
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
);
390 * Run the String getName() method test.
394 * @generatedBy CodePro at 03/05/12 2:29 PM
397 public void testGetName_2()
399 CtfTmfTrace fixture
= initTrace();
401 String result
= fixture
.getName();
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
);
411 * Run the String getName() method test.
415 * @generatedBy CodePro at 03/05/12 2:29 PM
418 public void testGetName_3()
420 CtfTmfTrace fixture
= initTrace();
422 String result
= fixture
.getName();
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
);
432 * Run the int getNbEnvVars() method test.
436 * @generatedBy CodePro at 03/05/12 2:29 PM
439 public void testGetNbEnvVars_1()
441 CtfTmfTrace fixture
= initTrace();
443 int result
= fixture
.getNbEnvVars();
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
);
453 * Run the long getNbEvents() method test.
457 * @generatedBy CodePro at 03/05/12 2:29 PM
460 public void testGetNbEvents_1()
462 CtfTmfTrace fixture
= initTrace();
464 long result
= fixture
.getNbEvents();
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
);
474 * Run the CtfTmfEvent getNext(ITmfContext) method test.
478 * @generatedBy CodePro at 03/05/12 2:29 PM
481 public void testGetNext_1()
483 CtfTmfTrace fixture
= initTrace();
484 ITmfContext context
= fixture
.seekEvent(0);
486 CtfTmfEvent result
= fixture
.getNext(context
);
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
);
496 * Run the String getPath() method test.
500 * @generatedBy CodePro at 03/05/12 2:29 PM
503 public void testGetPath_1()
505 CtfTmfTrace fixture
= initTrace();
507 String result
= fixture
.getPath();
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
);
517 * Run the IResource getResource() method test.
521 * @generatedBy CodePro at 03/05/12 2:29 PM
524 public void testGetResource_1()
526 CtfTmfTrace fixture
= initTrace();
528 IResource result
= fixture
.getResource();
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)
538 * Run the ITmfTimestamp getStartTime() method test.
542 * @generatedBy CodePro at 03/05/12 2:29 PM
545 public void testGetStartTime_1()
547 CtfTmfTrace fixture
= initTrace();
549 ITmfTimestamp result
= fixture
.getStartTime();
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
);
559 * Run the IStateSystemQuerier getStateSystem() method test.
563 * @generatedBy CodePro at 03/05/12 2:29 PM
566 public void testGetStateSystem_1()
568 CtfTmfTrace fixture
= initTrace();
569 IStateSystemQuerier result
= fixture
.getStateSystem();
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)
579 * Run the long getStreamingInterval() method test.
583 * @generatedBy CodePro at 03/05/12 2:29 PM
586 public void testGetStreamingInterval_1()
588 CtfTmfTrace fixture
= initTrace();
590 long result
= fixture
.getStreamingInterval();
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
);
600 * Run the TmfTimeRange getTimeRange() method test.
604 * @generatedBy CodePro at 03/05/12 2:29 PM
607 public void testGetTimeRange_1()
609 CtfTmfTrace fixture
= initTrace();
611 TmfTimeRange result
= fixture
.getTimeRange();
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
);
621 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
625 * @generatedBy CodePro at 03/05/12 2:29 PM
628 public void testInitTrace_1()
630 CtfTmfTrace fixture
= initTrace();
632 IResource resource
= null;
634 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
636 fixture
.initTrace(resource
, path
, eventType
);
638 assertNotNull(fixture
);
642 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
646 * @generatedBy CodePro at 03/05/12 2:29 PM
649 public void testInitTrace_2()
651 CtfTmfTrace fixture
= initTrace();
652 IResource resource
= null;
654 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
656 fixture
.initTrace(resource
, path
, eventType
);
658 assertNotNull(fixture
);
662 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
666 * @generatedBy CodePro at 03/05/12 2:29 PM
669 public void testInitTrace_3()
671 CtfTmfTrace fixture
= initTrace();
672 IResource resource
= null;
674 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
676 fixture
.initTrace(resource
, path
, eventType
);
678 assertNotNull(fixture
);
682 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
686 * @generatedBy CodePro at 03/05/12 2:29 PM
689 public void testInitTrace_4()
691 CtfTmfTrace fixture
= initTrace();
693 IResource resource
= null;
695 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
697 fixture
.initTrace(resource
, path
, eventType
);
699 assertNotNull(fixture
);
703 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
707 * @generatedBy CodePro at 03/05/12 2:29 PM
710 public void testInitTrace_5()
712 CtfTmfTrace fixture
= initTrace();
713 IResource resource
= null;
715 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
717 fixture
.initTrace(resource
, path
, eventType
);
719 assertNotNull(fixture
);
723 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
727 * @generatedBy CodePro at 03/05/12 2:29 PM
730 public void testInitTrace_6()
732 CtfTmfTrace fixture
= initTrace();
733 IResource resource
= null;
735 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
737 fixture
.initTrace(resource
, path
, eventType
);
739 assertNotNull(fixture
);
743 * Run the void initTrace(IResource,String,Class<CtfTmfEvent>) method test.
747 * @generatedBy CodePro at 03/05/12 2:29 PM
750 public void testInitTrace_7()
752 CtfTmfTrace fixture
= initTrace();
753 IResource resource
= null;
755 Class
<CtfTmfEvent
> eventType
= CtfTmfEvent
.class;
757 fixture
.initTrace(resource
, path
, eventType
);
759 assertNotNull(fixture
);
763 * Run the CtfTmfEvent readNextEvent(ITmfContext) method test.
767 * @generatedBy CodePro at 03/05/12 2:29 PM
770 public void testReadNextEvent_1()
772 CtfTmfTrace fixture
= initTrace();
773 ITmfContext context
= fixture
.seekEvent(0);
775 CtfTmfEvent result
= fixture
.getNext(context
);
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
);
785 * Run the ITmfContext seekEvent(double) method test.
789 * @generatedBy CodePro at 03/05/12 2:29 PM
792 public void testSeekEvent_1()
794 CtfTmfTrace fixture
= initTrace();
797 ITmfContext result
= fixture
.seekEvent(ratio
);
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
);
807 * Run the ITmfContext seekEvent(long) method test.
811 * @generatedBy CodePro at 03/05/12 2:29 PM
814 public void testSeekEvent_2()
816 CtfTmfTrace fixture
= initTrace();
819 ITmfContext result
= fixture
.seekEvent(rank
);
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
);
829 * Run the ITmfContext seekEvent(ITmfTimestamp) method test.
833 * @generatedBy CodePro at 03/05/12 2:29 PM
836 public void testSeekEvent_3()
838 CtfTmfTrace fixture
= initTrace();
839 ITmfTimestamp timestamp
= new TmfTimestamp();
841 ITmfContext result
= fixture
.seekEvent(timestamp
);
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
);
851 // * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
853 // * @throws Exception
855 // * @generatedBy CodePro at 03/05/12 2:29 PM
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));
872 // ITmfContext result = fixture.seekEvent(location);
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);
882 // * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
884 // * @throws Exception
886 // * @generatedBy CodePro at 03/05/12 2:29 PM
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);
901 * Run the boolean validate(IProject,String) method test.
905 * @generatedBy CodePro at 03/05/12 2:29 PM
908 public void testValidate_1()
910 CtfTmfTrace fixture
= initTrace();
911 IProject project
= null;
914 boolean result
= fixture
.validate(project
, path
);
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)
924 * Run the boolean validate(IProject,String) method test.
928 * @generatedBy CodePro at 03/05/12 2:29 PM
931 public void testValidate_2()
933 CtfTmfTrace fixture
= initTrace();
934 IProject project
= null;
937 boolean result
= fixture
.validate(project
, path
);
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)
947 * Run the boolean validate(IProject,String) method test.
951 * @generatedBy CodePro at 03/05/12 2:29 PM
954 public void testValidate_3()
956 CtfTmfTrace fixture
= initTrace();
957 IProject project
= null;
960 boolean result
= fixture
.validate(project
, path
);
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)
970 * Perform pre-test initialization.
973 * if the initialization fails for some reason
975 * @generatedBy CodePro at 03/05/12 2:29 PM
980 // add additional set up code here
984 * Perform post-test clean-up.
987 * if the clean-up fails for some reason
989 * @generatedBy CodePro at 03/05/12 2:29 PM
992 public void tearDown()
994 // Add additional tear down code here
1000 * @param args the command line arguments
1002 * @generatedBy CodePro at 03/05/12 2:29 PM
1004 public static void main(String
[] args
) {
1005 new org
.junit
.runner
.JUnitCore().run(CtfTmfTraceTest
.class);