bbac2ee1ced0145d25bfe80ecf03c94c4e7a1baa
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / statistics / TmfStateStatisticsTest.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 * Alexandre Montplaisir - Initial API and implementation
11 ******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.tests.statistics;
14
15 import static org.junit.Assume.assumeTrue;
16 import static org.junit.Assert.fail;
17
18 import java.io.File;
19 import java.io.IOException;
20
21 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
22 import org.eclipse.linuxtools.tmf.core.statistics.TmfStateStatistics;
23 import org.junit.AfterClass;
24 import org.junit.BeforeClass;
25
26 /**
27 * Unit tests for the {@link TmfStateStatistics}
28 *
29 * @author Alexandre Montplaisir
30 */
31 public class TmfStateStatisticsTest extends TmfStatisticsTest {
32
33 private static File htFile;
34
35 /**
36 * Set up the fixture (build the state history, etc.) once for all tests.
37 */
38 @BeforeClass
39 public static void setUpClass() {
40 assumeTrue(testTrace.exists());
41 try {
42 htFile = File.createTempFile("stats-test", ".ht");
43 backend = new TmfStateStatistics(testTrace.getTrace(), htFile);
44
45 } catch (TmfTraceException e) {
46 fail();
47 } catch (IOException e) {
48 fail();
49 }
50 }
51
52 /**
53 * Class cleanup
54 */
55 @AfterClass
56 public static void tearDownClass() {
57 htFile.delete();
58 }
59 }
This page took 0.034554 seconds and 4 git commands to generate.