Don't catch the FileNotFound exception in CTF tests
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / trace / MetadataTest.java
1 package org.eclipse.linuxtools.ctf.core.tests.trace;
2
3 import static org.junit.Assert.assertNotNull;
4 import static org.junit.Assert.assertNull;
5
6 import java.nio.ByteOrder;
7
8 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
9 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
10 import org.eclipse.linuxtools.ctf.core.trace.Metadata;
11 import org.junit.After;
12 import org.junit.Before;
13 import org.junit.Test;
14
15 /**
16 * The class <code>MetadataTest</code> contains tests for the class
17 * <code>{@link Metadata}</code>.
18 *
19 * @author ematkho
20 * @version $Revision: 1.0 $
21 */
22 public class MetadataTest {
23
24 private Metadata fixture;
25
26 /**
27 * Launch the test.
28 *
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.
38 *
39 * @throws CTFReaderException
40 */
41 @Before
42 public void setUp() throws CTFReaderException {
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
71 /**
72 * Run the void parse() method test.
73 *
74 * @throws CTFReaderException
75 */
76 @Test(expected = org.eclipse.linuxtools.ctf.core.trace.CTFReaderException.class)
77 public void testParse() throws CTFReaderException {
78 fixture.parse();
79 }
80 }
This page took 0.031309 seconds and 5 git commands to generate.