tmf: Update the ctfadaptor tests for the new formatting
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / CtfTmfEventTypeTest.java
CommitLineData
95bf10e7
AM
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
81c8e6f7
MK
14package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
15
aa572e22
MK
16import static org.junit.Assert.assertEquals;
17import static org.junit.Assert.assertNotNull;
18
81c8e6f7
MK
19import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEventType;
20import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
21import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
aa572e22
MK
22import org.junit.After;
23import org.junit.Before;
24import org.junit.Test;
81c8e6f7
MK
25
26/**
95bf10e7
AM
27 * The class <code>CtfTmfEventTypeTest</code> contains tests for the class
28 * <code>{@link CtfTmfEventType}</code>.
81c8e6f7 29 *
81c8e6f7 30 * @author ematkho
95bf10e7 31 * @version 1.0
81c8e6f7
MK
32 */
33public class CtfTmfEventTypeTest {
81c8e6f7
MK
34
35 /**
95bf10e7 36 * Launch the test.
81c8e6f7 37 *
95bf10e7 38 * @param args the command line arguments
81c8e6f7 39 */
95bf10e7
AM
40 public static void main(String[] args) {
41 new org.junit.runner.JUnitCore().run(CtfTmfEventTypeTest.class);
81c8e6f7
MK
42 }
43
44 /**
45 * Perform pre-test initialization.
81c8e6f7
MK
46 */
47 @Before
95bf10e7 48 public void setUp() {
81c8e6f7
MK
49 // add additional set up code here
50 }
51
52 /**
53 * Perform post-test clean-up.
81c8e6f7
MK
54 */
55 @After
95bf10e7 56 public void tearDown() {
81c8e6f7
MK
57 // Add additional tear down code here
58 }
59
95bf10e7 60
81c8e6f7 61 /**
95bf10e7 62 * Run the CtfTmfEventType(String,String,ITmfEventField) constructor test.
81c8e6f7 63 */
95bf10e7
AM
64 @Test
65 public void testCtfTmfEventType() {
66 String eventName = ""; //$NON-NLS-1$
67 ITmfEventField content = new TmfEventField("", new ITmfEventField[] {}); //$NON-NLS-1$
68 CtfTmfEventType result = new CtfTmfEventType( eventName, content);
69
70 assertNotNull(result);
71 assertEquals("", result.toString()); //$NON-NLS-1$
72 assertEquals("", result.getName()); //$NON-NLS-1$
73 assertEquals("Ctf Event", result.getContext()); //$NON-NLS-1$
74 }
75
76 /**
77 * Run the String toString() method test.
78 */
79 @Test
80 public void testToString() {
81 ITmfEventField emptyField = new TmfEventField("", new ITmfEventField[] {}); //$NON-NLS-1$
82 CtfTmfEventType fixture = new CtfTmfEventType("", emptyField); //$NON-NLS-1$
83
84 String result = fixture.toString();
85
86 assertEquals("", result); //$NON-NLS-1$
81c8e6f7
MK
87 }
88}
This page took 0.032255 seconds and 5 git commands to generate.