LTTng: CPU usage analysis from the LTTng kernel trace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / CtfTmfEventTypeTest.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 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.CtfTmfEventType;
20 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
21 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
22 import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
23 import org.junit.Test;
24
25 /**
26 * The class <code>CtfTmfEventTypeTest</code> contains tests for the class
27 * <code>{@link CtfTmfEventType}</code>.
28 *
29 * @author ematkho
30 * @version 1.0
31 */
32 public class CtfTmfEventTypeTest {
33
34 /**
35 * Run the CtfTmfEventType(String,String,ITmfEventField) constructor test.
36 */
37 @Test
38 public void testCtfTmfEventType() {
39 String eventName = "";
40 ITmfEventField content = new TmfEventField("", null, new ITmfEventField[] {});
41 CtfTmfEventType result = new CtfTmfEventType(eventName, new TmfTraceStub(), content);
42
43 assertNotNull(result);
44 assertEquals("", result.toString());
45 assertEquals("", result.getName());
46 assertEquals("Ctf Event/null", result.getContext());
47 }
48
49 /**
50 * Run the String toString() method test.
51 */
52 @Test
53 public void testToString() {
54 ITmfEventField emptyField = new TmfEventField("", null, new ITmfEventField[] {});
55 CtfTmfEventType fixture = new CtfTmfEventType("", new TmfTraceStub() , emptyField);
56
57 String result = fixture.toString();
58
59 assertEquals("", result);
60 }
61 }
This page took 0.059974 seconds and 5 git commands to generate.