lttng: Fix FindBugs warnings in lttng2.kernel.core.tests
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.core.tests / src / org / eclipse / linuxtools / lttng2 / kernel / core / tests / stateprovider / CTFKernelStateInputTest.java
CommitLineData
efc403bb
AM
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
13package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
14
b4f71e4a 15import static org.junit.Assert.assertEquals;
8020be3c 16
b4f71e4a
FC
17import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.CTFKernelStateInput;
18import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
19import org.eclipse.linuxtools.tmf.core.statesystem.StateSystem;
20import org.eclipse.linuxtools.tmf.core.statesystem.helpers.IStateChangeInput;
efc403bb
AM
21import org.junit.AfterClass;
22import org.junit.BeforeClass;
23import org.junit.Test;
efc403bb
AM
24
25/**
26 * Tests for the LTTng 2.0 kernel state provider
27 *
28 * @author alexmont
29 *
30 */
31public class CTFKernelStateInputTest {
32
ebd67b34 33 static IStateChangeInput input;
efc403bb
AM
34
35 @BeforeClass
b4f71e4a 36 public static void initialize() throws TmfTraceException {
efc403bb
AM
37 input = new CTFKernelStateInput(CTFTestFiles.getTestTrace());
38
39 }
40
41 @AfterClass
42 public static void cleanup() {
43 //
44 }
45
46 @Test
47 public void testOpening() {
48 long testStartTime;
49 testStartTime = input.getStartTime();
8020be3c 50 assertEquals(testStartTime, CTFTestFiles.startTime);
efc403bb
AM
51 }
52
53 @Test
54 public void testRunning() {
55 StateSystem ss = new StateSystem();
56 input.assignTargetStateSystem(ss);
57 input.getStateSystem(); /* Let's pad that coverage... */
58 input.run();
59 }
60
61}
This page took 0.026732 seconds and 5 git commands to generate.