/*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2014 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
-import org.eclipse.linuxtools.tmf.core.tests.shared.CtfTmfTestTraces;
+import org.eclipse.linuxtools.tmf.core.tests.shared.CtfTmfTestTrace;
import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
*/
public class CtfTmfTraceTest {
- private static final int TRACE_INDEX = 0;
- private static final String PATH = CtfTmfTestTraces.getTestTracePath(TRACE_INDEX);
+ private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.KERNEL;
private CtfTmfTrace fixture;
*/
@Before
public void setUp() throws TmfTraceException {
- assumeTrue(CtfTmfTestTraces.tracesExist());
+ assumeTrue(testTrace.exists());
fixture = new CtfTmfTrace();
- fixture.initTrace((IResource) null, PATH, CtfTmfEvent.class);
+ fixture.initTrace((IResource) null, testTrace.getPath(), CtfTmfEvent.class);
}
/**
assertEquals(0L, result.getNbEvents());
assertEquals(0L, result.getStreamingInterval());
assertNull(result.getResource());
- assertEquals(1000, result.getQueueSize());
assertNull(result.getType());
}
*/
@Test
public void testGetEventType() {
- Class<ITmfEvent> result = fixture.getEventType();
+ Class<? extends ITmfEvent> result = fixture.getEventType();
assertNotNull(result);
}
@Test
public void testValidate() {
IProject project = null;
- String path = PATH;
- IStatus result = fixture.validate(project, path);
+ IStatus result = fixture.validate(project, testTrace.getPath());
assertTrue(result.isOK());
}
assertTrue(fixture.hasAtLeastOneOfEvents(names));
assertFalse(fixture.hasAllEvents(names));
}
+
+ /**
+ * Run the String getHostId() method test
+ */
+ @Test
+ public void testCtfHostId() {
+ String a = fixture.getHostId();
+ assertEquals("\"84db105b-b3f4-4821-b662-efc51455106a\"", a);
+ }
+
}