Refactor TmfTrace and dependencies - remove getTrace()
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.core.tests / src / org / eclipse / linuxtools / lttng2 / kernel / core / tests / stateprovider / CTFKernelStateInputTest.java
1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
5 *
6 * All rights reserved. This program and the accompanying materials are
7 * made available under the terms of the Eclipse Public License v1.0 which
8 * accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
14
15 import static org.junit.Assert.*;
16
17 import java.io.FileNotFoundException;
18
19 import org.junit.AfterClass;
20 import org.junit.BeforeClass;
21 import org.junit.Test;
22 import org.eclipse.linuxtools.tmf.core.statesystem.StateSystem;
23 import org.eclipse.linuxtools.tmf.core.statesystem.helpers.IStateChangeInput;
24 import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.CTFKernelStateInput;
25
26 /**
27 * Tests for the LTTng 2.0 kernel state provider
28 *
29 * @author alexmont
30 *
31 */
32 public class CTFKernelStateInputTest {
33
34 protected static IStateChangeInput input;
35
36 @BeforeClass
37 public static void initialize() throws FileNotFoundException {
38 input = new CTFKernelStateInput(CTFTestFiles.getTestTrace());
39
40 }
41
42 @AfterClass
43 public static void cleanup() {
44 //
45 }
46
47 @Test
48 public void testOpening() {
49 long testStartTime;
50 testStartTime = input.getStartTime();
51 assertEquals(testStartTime, CTFTestFiles.startTime);
52 }
53
54 @Test
55 public void testRunning() {
56 StateSystem ss = new StateSystem();
57 input.assignTargetStateSystem(ss);
58 input.getStateSystem(); /* Let's pad that coverage... */
59 input.run();
60 }
61
62 }
This page took 0.030677 seconds and 5 git commands to generate.