Updated some javadoc in org.eclipse.linuxtools.tmf.core plug-in
[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 */
22public class MetadataTest {
23
24 private Metadata fixture;
25
26 /**
27 * Launch the test.
e291b8c8 28 *
866e5b51
FC
29 * @param args
30 * the command line arguments
31 */
32 public static void main(String[] args) {
33 new org.junit.runner.JUnitCore().run(MetadataTest.class);
34 }
35
36 /**
37 * Perform pre-test initialization.
13be1a8f
AM
38 *
39 * @throws CTFReaderException
866e5b51
FC
40 */
41 @Before
13be1a8f 42 public void setUp() throws CTFReaderException {
866e5b51
FC
43 fixture = new Metadata(TestParams.createTrace());
44 }
45
46 /**
47 * Perform post-test clean-up.
48 */
49 @After
50 public void tearDown() {
51 // Add additional tear down code here
52 }
53
54 /**
55 * Run the Metadata(CTFTrace) constructor test.
56 */
57 @Test
58 public void testMetadata() {
59 assertNotNull(fixture);
60 }
61
62 /**
63 * Run the ByteOrder getDetectedByteOrder() method test.
64 */
65 @Test
66 public void testGetDetectedByteOrder() {
67 ByteOrder result = fixture.getDetectedByteOrder();
68 assertNull(result);
69 }
70
e291b8c8
MK
71 /**
72 * Test toString
73 */
74 @Test
75 public void testToSting() {
76 String result = fixture.toString();
77 assertNotNull(result);
78 }
79
866e5b51
FC
80 /**
81 * Run the void parse() method test.
e291b8c8 82 *
866e5b51
FC
83 * @throws CTFReaderException
84 */
85 @Test(expected = org.eclipse.linuxtools.ctf.core.trace.CTFReaderException.class)
86 public void testParse() throws CTFReaderException {
87 fixture.parse();
88 }
89}
This page took 0.049757 seconds and 5 git commands to generate.