| 1 | package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor; |
| 2 | |
| 3 | import static org.junit.Assert.assertEquals; |
| 4 | import static org.junit.Assert.assertNotNull; |
| 5 | |
| 6 | import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEventType; |
| 7 | import org.eclipse.linuxtools.tmf.core.event.ITmfEventField; |
| 8 | import org.eclipse.linuxtools.tmf.core.event.TmfEventField; |
| 9 | import org.junit.After; |
| 10 | import org.junit.Before; |
| 11 | import org.junit.Test; |
| 12 | |
| 13 | /** |
| 14 | * The class <code>CtfTmfEventTypeTest</code> contains tests for the class <code>{@link CtfTmfEventType}</code>. |
| 15 | * |
| 16 | * @generatedBy CodePro at 03/05/12 2:29 PM |
| 17 | * @author ematkho |
| 18 | * @version $Revision: 1.0 $ |
| 19 | */ |
| 20 | public class CtfTmfEventTypeTest { |
| 21 | /** |
| 22 | * Run the CtfTmfEventType(String,String,ITmfEventField) constructor test. |
| 23 | * |
| 24 | * @throws Exception |
| 25 | * |
| 26 | * @generatedBy CodePro at 03/05/12 2:29 PM |
| 27 | */ |
| 28 | @Test |
| 29 | public void testCtfTmfEventType_1() { |
| 30 | String contextId = ""; //$NON-NLS-1$ |
| 31 | String eventName = ""; //$NON-NLS-1$ |
| 32 | ITmfEventField content = new TmfEventField("", new ITmfEventField[] {}); //$NON-NLS-1$ |
| 33 | |
| 34 | CtfTmfEventType result = new CtfTmfEventType( eventName, content); |
| 35 | |
| 36 | // add additional test code here |
| 37 | assertNotNull(result); |
| 38 | assertEquals("", result.toString()); //$NON-NLS-1$ |
| 39 | assertEquals("", result.getName()); //$NON-NLS-1$ |
| 40 | assertEquals("Ctf Event", result.getContext()); //$NON-NLS-1$ |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Run the String toString() method test. |
| 45 | * |
| 46 | * @throws Exception |
| 47 | * |
| 48 | * @generatedBy CodePro at 03/05/12 2:29 PM |
| 49 | */ |
| 50 | @Test |
| 51 | public void testToString_1() |
| 52 | throws Exception { |
| 53 | CtfTmfEventType fixture = new CtfTmfEventType("", new TmfEventField("", new ITmfEventField[] {})); //$NON-NLS-1$ //$NON-NLS-2$ |
| 54 | |
| 55 | String result = fixture.toString(); |
| 56 | |
| 57 | // add additional test code here |
| 58 | assertEquals("", result); //$NON-NLS-1$ |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Perform pre-test initialization. |
| 63 | * |
| 64 | * @throws Exception |
| 65 | * if the initialization fails for some reason |
| 66 | * |
| 67 | * @generatedBy CodePro at 03/05/12 2:29 PM |
| 68 | */ |
| 69 | @Before |
| 70 | public void setUp() |
| 71 | throws Exception { |
| 72 | // add additional set up code here |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Perform post-test clean-up. |
| 77 | * |
| 78 | * @throws Exception |
| 79 | * if the clean-up fails for some reason |
| 80 | * |
| 81 | * @generatedBy CodePro at 03/05/12 2:29 PM |
| 82 | */ |
| 83 | @After |
| 84 | public void tearDown() |
| 85 | throws Exception { |
| 86 | // Add additional tear down code here |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Launch the test. |
| 91 | * |
| 92 | * @param args the command line arguments |
| 93 | * |
| 94 | * @generatedBy CodePro at 03/05/12 2:29 PM |
| 95 | */ |
| 96 | public static void main(String[] args) { |
| 97 | new org.junit.runner.JUnitCore().run(CtfTmfEventTypeTest.class); |
| 98 | } |
| 99 | } |