tmf: Move some logic outside of HistoryBuilder
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / trace / MetadataTest.java
CommitLineData
866e5b51
FC
1package org.eclipse.linuxtools.ctf.core.tests.trace;
2
3import static org.junit.Assert.assertNotNull;
4import static org.junit.Assert.assertNull;
5
6import java.nio.ByteOrder;
7
8import org.eclipse.linuxtools.ctf.core.tests.TestParams;
9import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
10import org.eclipse.linuxtools.ctf.core.trace.Metadata;
11import org.junit.After;
12import org.junit.Before;
13import org.junit.Test;
14
15/**
16 * The class <code>MetadataTest</code> contains tests for the class
17 * <code>{@link Metadata}</code>.
e291b8c8 18 *
866e5b51
FC
19 * @author ematkho
20 * @version $Revision: 1.0 $
21 */
be6df2d8 22@SuppressWarnings("javadoc")
866e5b51
FC
23public class MetadataTest {
24
25 private Metadata fixture;
26
27 /**
28 * Launch the test.
e291b8c8 29 *
866e5b51
FC
30 * @param args
31 * the command line arguments
32 */
33 public static void main(String[] args) {
34 new org.junit.runner.JUnitCore().run(MetadataTest.class);
35 }
36
37 /**
38 * Perform pre-test initialization.
be6df2d8
AM
39 *
40 * @throws CTFReaderException
866e5b51
FC
41 */
42 @Before
13be1a8f 43 public void setUp() throws CTFReaderException {
866e5b51
FC
44 fixture = new Metadata(TestParams.createTrace());
45 }
46
47 /**
48 * Perform post-test clean-up.
49 */
50 @After
51 public void tearDown() {
52 // Add additional tear down code here
53 }
54
55 /**
56 * Run the Metadata(CTFTrace) constructor test.
57 */
58 @Test
59 public void testMetadata() {
60 assertNotNull(fixture);
61 }
62
63 /**
64 * Run the ByteOrder getDetectedByteOrder() method test.
65 */
66 @Test
67 public void testGetDetectedByteOrder() {
68 ByteOrder result = fixture.getDetectedByteOrder();
69 assertNull(result);
70 }
71
e291b8c8
MK
72 /**
73 * Test toString
74 */
75 @Test
76 public void testToSting() {
77 String result = fixture.toString();
78 assertNotNull(result);
79 }
80
866e5b51
FC
81 /**
82 * Run the void parse() method test.
e291b8c8 83 *
866e5b51
FC
84 * @throws CTFReaderException
85 */
86 @Test(expected = org.eclipse.linuxtools.ctf.core.trace.CTFReaderException.class)
87 public void testParse() throws CTFReaderException {
88 fixture.parse();
89 }
90}
This page took 0.031403 seconds and 5 git commands to generate.