lttng: Update kernel provider tests to the new trace location
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / types / DefinitionTest.java
CommitLineData
866e5b51
FC
1package org.eclipse.linuxtools.ctf.core.tests.types;
2
3import static org.junit.Assert.assertNotNull;
4
866e5b51
FC
5import org.eclipse.linuxtools.ctf.core.event.types.Definition;
6import org.eclipse.linuxtools.ctf.core.event.types.IDefinitionScope;
ce2388e0 7import org.eclipse.linuxtools.internal.ctf.core.event.io.BitBuffer;
866e5b51
FC
8import org.junit.After;
9import org.junit.Before;
10import org.junit.Test;
11
12/**
13 * The class <code>DefinitionTest</code> contains tests for the class
14 * <code>{@link Definition}</code>.
15 *
16 * @author ematkho
17 * @version $Revision: 1.0 $
18 */
19public class DefinitionTest {
20
21 /**
22 * Launch the test.
23 *
24 * @param args
25 * the command line arguments
26 */
27 public static void main(String[] args) {
28 new org.junit.runner.JUnitCore().run(DefinitionTest.class);
29 }
30
31 /**
32 * Perform pre-test initialization.
33 */
34 @Before
35 public void setUp() {
36 // add additional set up code here
37 }
38
39 /**
40 * Perform post-test clean-up.
41 */
42 @After
43 public void tearDown() {
44 // Add additional tear down code here
45 }
46
47 /**
48 * Since Definition is abstract, we'll minimally extend it here to
49 * instantiate it.
50 */
51 class DefTest extends Definition {
52
53 public DefTest(IDefinitionScope definitionScope, String fieldName) {
54 super(definitionScope, fieldName);
55 }
56
57 @Override
58 public void read(BitBuffer input) {
59 /* Just a test, no need to implement anything */
60 }
61
62 }
63
64 @Test
65 public void testToString() throws Exception {
66 Definition fixture = new DefTest(null, "Hello"); //$NON-NLS-1$
67 String result = fixture.toString();
68
69 assertNotNull(result);
70 }
71}
This page took 0.031978 seconds and 5 git commands to generate.