Merge branch 'master' into lttng-kepler
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / CtfTmfContentTest.java
1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Matthew Khouzam - Initial generation with CodePro tools
11 * Alexandre Montplaisir - Clean up, consolidate redundant tests
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
15
16 import static org.junit.Assert.assertEquals;
17 import static org.junit.Assert.assertNotNull;
18
19 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfContent;
20 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
21 import org.junit.After;
22 import org.junit.Before;
23 import org.junit.Test;
24
25 /**
26 * The class <code>CtfTmfContentTest</code> contains tests for the class
27 * <code>{@link CtfTmfContent}</code>.
28 *
29 * @author ematkho
30 * @version 1.0
31 */
32 public class CtfTmfContentTest {
33
34 private CtfTmfContent fixture;
35
36 /**
37 * Launch the test.
38 *
39 * @param args
40 * the command line arguments
41 */
42 public static void main(String[] args) {
43 new org.junit.runner.JUnitCore().run(CtfTmfContentTest.class);
44 }
45
46 /**
47 * Perform pre-test initialization.
48 */
49 @Before
50 public void setUp() {
51 fixture = new CtfTmfContent("", new ITmfEventField[] {}); //$NON-NLS-1$
52 }
53
54 /**
55 * Perform post-test clean-up.
56 */
57 @After
58 public void tearDown() {
59 // Add additional tear down code here
60 }
61
62
63 /**
64 * Run the CtfTmfContent(String,ITmfEventField[]) constructor test.
65 */
66 @Test
67 public void testCtfTmfContent() {
68 String name = ""; //$NON-NLS-1$
69 ITmfEventField[] fields = new ITmfEventField[] {};
70 CtfTmfContent result = new CtfTmfContent(name, fields);
71
72 assertNotNull(result);
73 assertEquals("", result.toString()); //$NON-NLS-1$
74 assertEquals("", result.getName()); //$NON-NLS-1$
75 assertEquals(null, result.getValue());
76 }
77
78 /**
79 * Run the String toString() method test.
80 */
81 @Test
82 public void testToString() {
83 String result = fixture.toString();
84 assertEquals("", result); //$NON-NLS-1$
85 }
86 }
This page took 0.031704 seconds and 5 git commands to generate.