Commit | Line | Data |
---|---|---|
e11e382c FW |
1 | /******************************************************************************* |
2 | * Copyright (c) 2014 École Polytechnique de Montréal | |
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 | * Geneviève Bastien - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.analysis.xml.core.tests.common; |
e11e382c FW |
14 | |
15 | import java.io.File; | |
16 | ||
17 | /** | |
18 | * Provides some test XML files to use | |
19 | * | |
20 | * @author Geneviève Bastien | |
21 | */ | |
22 | public enum TmfXmlTestFiles { | |
23 | /** A valid XML test file */ | |
2bdf0193 | 24 | VALID_FILE("../org.eclipse.tracecompass.tmf.analysis.xml.core.tests/test_xml_files/test_valid/test_valid.xml"), |
e11e382c | 25 | /** An invalid test file */ |
2bdf0193 | 26 | INVALID_FILE("../org.eclipse.tracecompass.tmf.analysis.xml.core.tests/test_xml_files/test_invalid/test_invalid.xml"); |
e11e382c FW |
27 | |
28 | private final String fPath; | |
29 | ||
30 | private TmfXmlTestFiles(String file) { | |
31 | fPath = file; | |
32 | } | |
33 | ||
34 | /** | |
35 | * Get the file name part of the file | |
36 | * | |
37 | * @return The path of this test file | |
38 | */ | |
39 | public String getPath() { | |
40 | return fPath; | |
41 | } | |
42 | ||
43 | /** | |
44 | * Returns the file object corresponding to the test XML file | |
45 | * | |
46 | * @return The file object for this test file | |
47 | */ | |
48 | public File getFile() { | |
49 | return new File(fPath); | |
50 | } | |
51 | ||
52 | } |