15400a8209b999a7817debbd675d5d1127d43d78
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / CtfTmfTimestampTest.java
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
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.CtfTmfTimestamp;
20 import org.junit.Test;
21
22 /**
23 * The class <code>CtfTmfTimestampTest</code> contains tests for the class
24 * <code>{@link CtfTmfTimestamp}</code>.
25 *
26 * @author ematkho
27 * @version 1.0
28 */
29 public class CtfTmfTimestampTest {
30
31 /**
32 * Launch the test.
33 *
34 * @param args the command line arguments
35 */
36 public static void main(String[] args) {
37 new org.junit.runner.JUnitCore().run(CtfTmfTimestampTest.class);
38 }
39
40 /**
41 * Run the CtfTmfTimestamp(long) constructor test.
42 */
43 @Test
44 public void testCtfTmfTimestamp() {
45 long timestamp = 1L;
46
47 CtfTmfTimestamp result = new CtfTmfTimestamp(timestamp);
48
49 assertNotNull(result);
50 assertEquals("00:00:00.000 000 001", result.toString()); //$NON-NLS-1$
51 assertEquals(0, result.getPrecision());
52 assertEquals(-9, result.getScale());
53 assertEquals(1L, result.getValue());
54 }
55 }
This page took 0.032247 seconds and 5 git commands to generate.