ctf: Disable NLS warnings in test plugin
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / trace / StreamInputPacketIndexEntryTest.java
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
7 *
8 * Contributors:
9 * Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
11
12 package org.eclipse.linuxtools.ctf.core.tests.trace;
13
14 import static org.junit.Assert.assertEquals;
15 import static org.junit.Assert.assertNotNull;
16
17 import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
18 import org.junit.After;
19 import org.junit.Before;
20 import org.junit.Test;
21
22 /**
23 * The class <code>StreamInputPacketIndexEntryTest</code> contains tests for the
24 * class <code>{@link StreamInputPacketIndexEntry}</code>.
25 *
26 * @author ematkho
27 * @version $Revision: 1.0 $
28 */
29 public class StreamInputPacketIndexEntryTest {
30
31 private StreamInputPacketIndexEntry fixture;
32
33 /**
34 * Launch the test.
35 *
36 * @param args
37 * the command line arguments
38 */
39 public static void main(String[] args) {
40 new org.junit.runner.JUnitCore().run(StreamInputPacketIndexEntryTest.class);
41 }
42
43 /**
44 * Perform pre-test initialization.
45 */
46 @Before
47 public void setUp() {
48 fixture = new StreamInputPacketIndexEntry(1L);
49 }
50
51 /**
52 * Perform post-test clean-up.
53 */
54 @After
55 public void tearDown() {
56 // Add additional tear down code here
57 }
58
59 /**
60 * Run the StreamInputPacketIndexEntry(long) constructor test.
61 */
62 @Test
63 public void testStreamInputPacketIndexEntry_1() {
64 String expectedResult = "StreamInputPacketIndexEntry [offsetBytes=1, " +
65 "timestampBegin=0, timestampEnd=0]";
66
67 assertNotNull(fixture);
68 assertEquals(expectedResult, fixture.toString());
69 }
70
71 /**
72 * Run the String toString() method test.
73 */
74 @Test
75 public void testToString() {
76 String expectedResult = "StreamInputPacketIndexEntry [offsetBytes=1,"+
77 " timestampBegin=1, timestampEnd=1]";
78
79
80 fixture.setContentSizeBits(1);
81 fixture.setDataOffsetBits(1);
82 fixture.setTimestampEnd(1L);
83 fixture.setPacketSizeBits(1);
84 fixture.setTimestampBegin(1L);
85
86 assertEquals(expectedResult, fixture.toString());
87 }
88 }
This page took 0.032649 seconds and 5 git commands to generate.