ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ctf.core.tests / src / org / eclipse / linuxtools / tmf / ctf / core / tests / CtfTmfEventTypeTest.java
CommitLineData
95bf10e7 1/*******************************************************************************
61759503 2 * Copyright (c) 2012, 2013 Ericsson
95bf10e7
AM
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
91e7f946 14package org.eclipse.linuxtools.tmf.ctf.core.tests;
81c8e6f7 15
aa572e22
MK
16import static org.junit.Assert.assertEquals;
17import static org.junit.Assert.assertNotNull;
18
81c8e6f7
MK
19import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
20import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
91e7f946 21import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEventType;
e5f7f02c 22import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
aa572e22 23import org.junit.Test;
81c8e6f7
MK
24
25/**
95bf10e7
AM
26 * The class <code>CtfTmfEventTypeTest</code> contains tests for the class
27 * <code>{@link CtfTmfEventType}</code>.
81c8e6f7 28 *
81c8e6f7 29 * @author ematkho
95bf10e7 30 * @version 1.0
81c8e6f7
MK
31 */
32public class CtfTmfEventTypeTest {
81c8e6f7 33
81c8e6f7 34 /**
95bf10e7 35 * Run the CtfTmfEventType(String,String,ITmfEventField) constructor test.
81c8e6f7 36 */
95bf10e7
AM
37 @Test
38 public void testCtfTmfEventType() {
6e1886bc 39 String eventName = "";
214cc822 40 ITmfEventField content = new TmfEventField("", null, new ITmfEventField[] {});
e5f7f02c 41 CtfTmfEventType result = new CtfTmfEventType(eventName, new TmfTraceStub(), content);
95bf10e7
AM
42
43 assertNotNull(result);
6e1886bc
AM
44 assertEquals("", result.toString());
45 assertEquals("", result.getName());
e5f7f02c 46 assertEquals("Ctf Event/null", result.getContext());
95bf10e7
AM
47 }
48
49 /**
50 * Run the String toString() method test.
51 */
52 @Test
53 public void testToString() {
214cc822 54 ITmfEventField emptyField = new TmfEventField("", null, new ITmfEventField[] {});
e5f7f02c 55 CtfTmfEventType fixture = new CtfTmfEventType("", new TmfTraceStub() , emptyField);
95bf10e7
AM
56
57 String result = fixture.toString();
58
6e1886bc 59 assertEquals("", result);
81c8e6f7 60 }
91e7f946 61}
This page took 0.076169 seconds and 5 git commands to generate.