tmf: Split "CTF adaptor" into separate plugins/feature
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.core.tests / src / org / eclipse / linuxtools / lttng2 / kernel / core / tests / stateprovider / LttngKernelStateProviderTest.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 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.assertEquals;
16 import static org.junit.Assume.assumeTrue;
17
18 import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
19 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
20 import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
21 import org.junit.BeforeClass;
22 import org.junit.Test;
23
24 /**
25 * Tests for the {@link LttngKernelStateProvider}
26 *
27 * @author Alexandre Montplaisir
28 */
29 public class LttngKernelStateProviderTest {
30
31 private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
32
33 private static ITmfStateProvider input;
34
35 /**
36 * Set-up.
37 */
38 @BeforeClass
39 public static void initialize() {
40 assumeTrue(testTrace.exists());
41 input = new LttngKernelStateProvider(testTrace.getTrace());
42
43 }
44
45 /**
46 * Test loading the state provider.
47 */
48 @Test
49 public void testOpening() {
50 long testStartTime;
51 testStartTime = input.getStartTime();
52 assertEquals(testStartTime, StateSystemTest.startTime);
53 }
54
55 }
This page took 0.03434 seconds and 5 git commands to generate.