1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.ctf
.core
.tests
.trace
;
14 import static org
.junit
.Assert
.assertNotNull
;
15 import static org
.junit
.Assert
.assertNull
;
16 import static org
.junit
.Assume
.assumeTrue
;
18 import java
.nio
.ByteOrder
;
20 import org
.eclipse
.linuxtools
.ctf
.core
.tests
.shared
.CtfTestTraces
;
21 import org
.eclipse
.linuxtools
.ctf
.core
.trace
.CTFReaderException
;
22 import org
.eclipse
.linuxtools
.ctf
.core
.trace
.Metadata
;
23 import org
.junit
.After
;
24 import org
.junit
.Before
;
25 import org
.junit
.Test
;
28 * The class <code>MetadataTest</code> contains tests for the class
29 * <code>{@link Metadata}</code>.
32 * @version $Revision: 1.0 $
34 @SuppressWarnings("javadoc")
35 public class MetadataTest
{
37 private static final int TRACE_INDEX
= 0;
39 private Metadata fixture
;
45 * the command line arguments
47 public static void main(String
[] args
) {
48 new org
.junit
.runner
.JUnitCore().run(MetadataTest
.class);
52 * Perform pre-test initialization.
54 * @throws CTFReaderException
57 public void setUp() throws CTFReaderException
{
58 assumeTrue(CtfTestTraces
.tracesExist());
59 fixture
= new Metadata(CtfTestTraces
.getTestTrace(TRACE_INDEX
));
63 * Perform post-test clean-up.
66 public void tearDown() {
67 // Add additional tear down code here
71 * Run the Metadata(CTFTrace) constructor test.
74 public void testMetadata() {
75 assertNotNull(fixture
);
79 * Run the ByteOrder getDetectedByteOrder() method test.
82 public void testGetDetectedByteOrder() {
83 ByteOrder result
= fixture
.getDetectedByteOrder();
91 public void testToSting() {
92 String result
= fixture
.toString();
93 assertNotNull(result
);
97 * Run the void parse() method test.
99 * @throws CTFReaderException
101 @Test(expected
= org
.eclipse
.linuxtools
.ctf
.core
.trace
.CTFReaderException
.class)
102 public void testParse() throws CTFReaderException
{
This page took 0.032974 seconds and 6 git commands to generate.