ctf: Disable NLS warnings in test plugin
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / types / DefinitionTest.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.types;
13
14 import static org.junit.Assert.assertNotNull;
15
16 import org.eclipse.linuxtools.ctf.core.event.io.BitBuffer;
17 import org.eclipse.linuxtools.ctf.core.event.types.Definition;
18 import org.eclipse.linuxtools.ctf.core.event.types.IDeclaration;
19 import org.eclipse.linuxtools.ctf.core.event.types.IDefinitionScope;
20 import org.junit.After;
21 import org.junit.Before;
22 import org.junit.Test;
23
24 /**
25 * The class <code>DefinitionTest</code> contains tests for the class
26 * <code>{@link Definition}</code>.
27 *
28 * @author ematkho
29 * @version $Revision: 1.0 $
30 */
31 @SuppressWarnings("javadoc")
32 public class DefinitionTest {
33
34 /**
35 * Launch the test.
36 *
37 * @param args
38 * the command line arguments
39 */
40 public static void main(String[] args) {
41 new org.junit.runner.JUnitCore().run(DefinitionTest.class);
42 }
43
44 /**
45 * Perform pre-test initialization.
46 */
47 @Before
48 public void setUp() {
49 // add additional set up code here
50 }
51
52 /**
53 * Perform post-test clean-up.
54 */
55 @After
56 public void tearDown() {
57 // Add additional tear down code here
58 }
59
60 /**
61 * Since Definition is abstract, we'll minimally extend it here to
62 * instantiate it.
63 */
64 class DefTest extends Definition {
65
66 public DefTest(IDefinitionScope definitionScope, String fieldName) {
67 super(definitionScope, fieldName);
68 }
69
70 @Override
71 public void read(BitBuffer input) {
72 /* Just a test, no need to implement anything */
73 }
74
75 @Override
76 public IDeclaration getDeclaration() {
77 // TODO Auto-generated method stub
78 return null;
79 }
80
81 }
82
83 @Test
84 public void testToString() {
85 Definition fixture = new DefTest(null, "Hello");
86 String result = fixture.toString();
87
88 assertNotNull(result);
89 }
90 }
This page took 0.031832 seconds and 5 git commands to generate.