Commit | Line | Data |
---|---|---|
95bf10e7 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2012, 2014 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 | ||
9722e5d7 | 14 | package org.eclipse.tracecompass.tmf.ctf.core.tests.event; |
81c8e6f7 | 15 | |
aa572e22 MK |
16 | import static org.junit.Assert.assertEquals; |
17 | import static org.junit.Assert.assertNotNull; | |
18 | ||
2bdf0193 AM |
19 | import org.eclipse.tracecompass.tmf.core.event.ITmfEventField; |
20 | import org.eclipse.tracecompass.tmf.core.event.TmfEventField; | |
9722e5d7 | 21 | import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEventType; |
aa572e22 | 22 | import org.junit.Test; |
81c8e6f7 MK |
23 | |
24 | /** | |
95bf10e7 AM |
25 | * The class <code>CtfTmfEventTypeTest</code> contains tests for the class |
26 | * <code>{@link CtfTmfEventType}</code>. | |
81c8e6f7 | 27 | * |
81c8e6f7 | 28 | * @author ematkho |
95bf10e7 | 29 | * @version 1.0 |
81c8e6f7 MK |
30 | */ |
31 | public class CtfTmfEventTypeTest { | |
81c8e6f7 | 32 | |
81c8e6f7 | 33 | /** |
95bf10e7 | 34 | * Run the CtfTmfEventType(String,String,ITmfEventField) constructor test. |
81c8e6f7 | 35 | */ |
95bf10e7 AM |
36 | @Test |
37 | public void testCtfTmfEventType() { | |
6e1886bc | 38 | String eventName = ""; |
214cc822 | 39 | ITmfEventField content = new TmfEventField("", null, new ITmfEventField[] {}); |
e600c338 | 40 | CtfTmfEventType result = new CtfTmfEventType(eventName, content); |
95bf10e7 AM |
41 | |
42 | assertNotNull(result); | |
6e1886bc AM |
43 | assertEquals("", result.toString()); |
44 | assertEquals("", result.getName()); | |
95bf10e7 AM |
45 | } |
46 | ||
47 | /** | |
48 | * Run the String toString() method test. | |
49 | */ | |
50 | @Test | |
51 | public void testToString() { | |
214cc822 | 52 | ITmfEventField emptyField = new TmfEventField("", null, new ITmfEventField[] {}); |
e600c338 | 53 | CtfTmfEventType fixture = new CtfTmfEventType("" , emptyField); |
95bf10e7 AM |
54 | |
55 | String result = fixture.toString(); | |
56 | ||
6e1886bc | 57 | assertEquals("", result); |
81c8e6f7 | 58 | } |
91e7f946 | 59 | } |