1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
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
10 * Matthew Khouzam - Initial generation with CodePro tools
11 * Alexandre Montplaisir - Clean up, consolidate redundant tests
12 * Patrick Tasse - Fix for local time zone
13 *******************************************************************************/
15 package org
.eclipse
.tracecompass
.tmf
.ctf
.core
.tests
;
17 import static org
.junit
.Assert
.assertEquals
;
18 import static org
.junit
.Assert
.assertNotNull
;
20 import java
.text
.DateFormat
;
21 import java
.text
.SimpleDateFormat
;
22 import java
.util
.Date
;
24 import org
.eclipse
.tracecompass
.tmf
.ctf
.core
.CtfTmfTimestamp
;
25 import org
.junit
.Test
;
28 * The class <code>CtfTmfTimestampTest</code> contains tests for the class
29 * <code>{@link CtfTmfTimestamp}</code>.
34 public class CtfTmfTimestampTest
{
37 * Run the CtfTmfTimestamp(long) constructor test.
40 public void testCtfTmfTimestamp() {
42 DateFormat df
= new SimpleDateFormat("HH:mm:ss.SSS");
43 Date d
= new Date(timestamp
/ 1000000);
45 CtfTmfTimestamp result
= new CtfTmfTimestamp(timestamp
);
47 assertNotNull(result
);
48 assertEquals(df
.format(d
) + " 000 001", result
.toString());
49 assertEquals(-9, result
.getScale());
50 assertEquals(1L, result
.getValue());
This page took 0.031495 seconds and 5 git commands to generate.