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
.Before
;
24 import org
.junit
.Test
;
27 * The class <code>MetadataTest</code> contains tests for the class
28 * <code>{@link Metadata}</code>.
31 * @version $Revision: 1.0 $
33 @SuppressWarnings("javadoc")
34 public class MetadataTest
{
36 private static final int TRACE_INDEX
= 0;
38 private Metadata fixture
;
41 * Perform pre-test initialization.
43 * @throws CTFReaderException
46 public void setUp() throws CTFReaderException
{
47 assumeTrue(CtfTestTraces
.tracesExist());
48 fixture
= new Metadata(CtfTestTraces
.getTestTrace(TRACE_INDEX
));
52 * Run the Metadata(CTFTrace) constructor test.
55 public void testMetadata() {
56 assertNotNull(fixture
);
60 * Run the ByteOrder getDetectedByteOrder() method test.
63 public void testGetDetectedByteOrder() {
64 ByteOrder result
= fixture
.getDetectedByteOrder();
72 public void testToSting() {
73 String result
= fixture
.toString();
74 assertNotNull(result
);
78 * Run the void parse() method test.
80 * @throws CTFReaderException
82 @Test(expected
= org
.eclipse
.linuxtools
.ctf
.core
.trace
.CTFReaderException
.class)
83 public void testParse() throws CTFReaderException
{
This page took 0.039879 seconds and 6 git commands to generate.