ss: Add unit tests for state values
[deliverable/tracecompass.git] / statesystem / org.eclipse.tracecompass.statesystem.core.tests / src / org / eclipse / tracecompass / statesystem / core / tests / statevalue / StringStateValueTest.java
1 /*******************************************************************************
2 * Copyright (c) 2016 École Polytechnique de Montréal
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9
10 package org.eclipse.tracecompass.statesystem.core.tests.statevalue;
11
12 import static org.junit.Assert.assertEquals;
13
14 import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
15 import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue.Type;
16 import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
17 import org.junit.Test;
18
19 /**
20 * Test the string state value class
21 *
22 * @author Geneviève Bastien
23 */
24 public class StringStateValueTest extends StateValueTestBase {
25
26 private static final String UNBOXED_VALUE = "MyString";
27 private static final TmfStateValue STATE_VALUE = TmfStateValue.newValueString(UNBOXED_VALUE);
28
29 @Override
30 protected ITmfStateValue getStateValueFixture() {
31 return STATE_VALUE;
32 }
33
34 @Override
35 protected Type getStateValueType() {
36 return ITmfStateValue.Type.STRING;
37 }
38
39 @Override
40 @Test
41 public void testUnboxStr() {
42 String unboxed = STATE_VALUE.unboxStr();
43 assertEquals(UNBOXED_VALUE, unboxed);
44 }
45 }
This page took 0.0334 seconds and 5 git commands to generate.