import junit.framework.TestCase;
-import org.eclipse.linuxtools.tmf.event.TmfEvent;
-import org.eclipse.linuxtools.tmf.event.TmfEventContent;
-import org.eclipse.linuxtools.tmf.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.event.TmfEventSource;
-import org.eclipse.linuxtools.tmf.event.TmfEventType;
-import org.eclipse.linuxtools.tmf.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
import org.eclipse.linuxtools.tmf.ui.views.statistics.ITmfExtraEventInfo;
+import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
import org.eclipse.linuxtools.tmf.ui.views.statistics.model.Messages;
import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfBaseStatisticsTree;
-import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfStatisticsTreeNode;
-import org.eclipse.linuxtools.tmf.util.TmfFixedArray;
@SuppressWarnings("nls")
public class TmfBaseStatisticsDataTest extends TestCase {
// ------------------------------------------------------------------------
private String fTestName = null;
- private final String fTypeId1 = "Some type1";
- private final String fTypeId2 = "Some type2";
+ private final String fContext = "UnitTest";
+ private final String fTypeId1 = "Some type1";
+ private final String fTypeId2 = "Some type2";
private final String fLabel0 = "label1";
private final String fLabel1 = "label2";
private final String fLabel2 = "label3";
private final String[] fLabels = new String[] { fLabel0, fLabel1, fLabel2 };
- private final TmfTimestamp fTimestamp1 = new TmfTimestamp(12345, (byte) 2, 5);
- private final TmfTimestamp fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
- private final TmfTimestamp fTimestamp3 = new TmfTimestamp(12355, (byte) 2, 5);
+ private final TmfTimestamp fTimestamp1 = new TmfTimestamp(12345, (byte) 2, 5);
+ private final TmfTimestamp fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
+ private final TmfTimestamp fTimestamp3 = new TmfTimestamp(12355, (byte) 2, 5);
- private final TmfEventSource fSource = new TmfEventSource("Source");
+ private final String fSource = "Source";
- private final TmfEventType fType1 = new TmfEventType(fTypeId1, fLabels);
- private final TmfEventType fType2 = new TmfEventType(fTypeId1, fLabels);
- private final TmfEventType fType3 = new TmfEventType(fTypeId2, fLabels);
+ private final TmfEventType fType1 = new TmfEventType(fContext, fTypeId1, fLabels);
+ private final TmfEventType fType2 = new TmfEventType(fContext, fTypeId1, fLabels);
+ private final TmfEventType fType3 = new TmfEventType(fContext, fTypeId2, fLabels);
- private final TmfEventReference fReference = new TmfEventReference("Some reference");
+ private final String fReference = "Some reference";
private final TmfEvent fEvent1;
private final TmfEvent fEvent2;
fContent1 = new TmfEventContent(fEvent1, "Some content");
fEvent1.setContent(fContent1);
- fEvent2 = new TmfEvent(fTimestamp1, fTimestamp2, fSource, fType2, fReference);
+ fEvent2 = new TmfEvent(fTimestamp2, fSource, fType2, fReference);
fContent2 = new TmfEventContent(fEvent2, "Some other content");
fEvent2.setContent(fContent2);
- fEvent3 = new TmfEvent(fTimestamp2, fTimestamp3, fSource, fType3, fReference);
+ fEvent3 = new TmfEvent(fTimestamp3, fSource, fType3, fReference);
fContent3 = new TmfEventContent(fEvent3, "Some other different content");
fEvent3.setContent(fContent3);
fStatsData.reset(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes));
assertEquals("reset", 0, fStatsData.getChildren(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes)).size());
- assertNull("reset", fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getTypeId())));
- assertNull("reset", fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType3.getTypeId())));
+ assertNull("reset", fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getId())));
+ assertNull("reset", fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType3.getId())));
fStatsData.reset(new TmfFixedArray<String>(fTestName));