tmf remote: Bug 460847: Add Junits for XML reader/writer of remote fetch
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.remote.ui.tests / src / org / eclipse / tracecompass / tmf / remote / ui / tests / fetch / AbstractRemoteImportProfilesIOTest.java
1 /*******************************************************************************
2 * Copyright (c) 2015 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 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.tmf.remote.ui.tests.fetch;
14
15 import java.io.File;
16
17 import org.eclipse.core.runtime.FileLocator;
18 import org.eclipse.core.runtime.IPath;
19 import org.eclipse.core.runtime.Path;
20 import org.eclipse.tracecompass.tmf.remote.ui.tests.TmfRemoteUITestPlugin;
21
22 /**
23 * Abstract class to test reading and writing profiles files.
24 */
25 public class AbstractRemoteImportProfilesIOTest {
26
27 /** Valid profile path */
28 protected static final Path VALID_PROFILE_PATH = new Path(
29 "resources/valid_profile.xml"); //$NON-NLS-1$
30
31 AbstractRemoteImportProfilesIOTest() {
32 super();
33 }
34
35 /**
36 * Get profiles file
37 *
38 * @param profilePath
39 * the profiles file path
40 * @return the profiles file
41 * @throws Exception
42 * if there is a failure getting the file
43 */
44 protected static File getProfilesFile(IPath profilePath) throws Exception {
45 File file = new File(FileLocator.toFileURL(
46 FileLocator.find(TmfRemoteUITestPlugin.getDefault().getBundle(),
47 profilePath, null)).toURI());
48 return file;
49 }
50 }
This page took 0.033817 seconds and 5 git commands to generate.