Commit | Line | Data |
---|---|---|
13201b83 | 1 | /******************************************************************************* |
60ae41e1 | 2 | * Copyright (c) 2013, 2014 Ericsson |
13201b83 MK |
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 API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.ui.tests.trace; |
eb8ea213 MK |
14 | |
15 | import java.util.ArrayList; | |
16 | ||
2bdf0193 AM |
17 | import org.eclipse.tracecompass.tmf.core.parsers.custom.CustomXmlTrace; |
18 | import org.eclipse.tracecompass.tmf.core.parsers.custom.CustomXmlTraceDefinition; | |
19 | import org.eclipse.tracecompass.tmf.core.parsers.custom.CustomTraceDefinition.OutputColumn; | |
a7418109 | 20 | import org.eclipse.tracecompass.tmf.core.parsers.custom.CustomXmlInputElement; |
2bdf0193 | 21 | import org.eclipse.tracecompass.tmf.core.project.model.TmfTraceType; |
eb8ea213 MK |
22 | import org.junit.Before; |
23 | ||
24 | /** | |
25 | * Abstract test parent | |
26 | * | |
27 | * @author Matthew Khouzam | |
28 | * | |
29 | */ | |
30 | public abstract class CustomXmlTraceTest { | |
31 | private CustomXmlTraceDefinition cxtd; | |
32 | /** | |
33 | * The trace to use to "validate" the xml files | |
34 | */ | |
35 | private CustomXmlTrace t; | |
36 | /** | |
37 | * The path of the trace | |
38 | */ | |
39 | private String path; | |
40 | ||
41 | ||
42 | /** | |
43 | * set up directories | |
44 | */ | |
45 | @Before | |
46 | public void init() { | |
a7418109 | 47 | cxtd = new CustomXmlTraceDefinition(TmfTraceType.CUSTOM_XML_CATEGORY, "test", new CustomXmlInputElement(), new ArrayList<OutputColumn>(), "s"); |
eb8ea213 MK |
48 | t = new CustomXmlTrace(cxtd); |
49 | } | |
50 | ||
51 | ||
52 | /** | |
53 | * @return the trace | |
54 | */ | |
55 | public CustomXmlTrace getTrace() { | |
56 | return t; | |
57 | } | |
58 | ||
59 | ||
60 | /** | |
61 | * @return the path | |
62 | */ | |
63 | public String getPath() { | |
64 | return path; | |
65 | } | |
66 | ||
67 | ||
68 | /** | |
69 | * @param path the path to set | |
70 | */ | |
71 | public void setPath(String path) { | |
72 | this.path = path; | |
73 | } | |
74 | ||
75 | } |