1 package org
.eclipse
.linuxtools
.tmf
.ui
.tests
.trace
;
3 import static org
.junit
.Assert
.fail
;
6 import java
.util
.ArrayList
;
7 import java
.util
.Collection
;
9 import org
.eclipse
.core
.runtime
.IStatus
;
10 import org
.junit
.Test
;
11 import org
.junit
.runner
.RunWith
;
12 import org
.junit
.runners
.Parameterized
;
13 import org
.junit
.runners
.Parameterized
.Parameters
;
17 * @author Matthew Khouzam
20 @RunWith(Parameterized
.class)
21 public class CustomXmlTraceValidTest
extends CustomXmlTraceTest
{
23 private final static String pathname
= "tracesets/xml/valid";
27 * This should create the parameters to launch the project
29 * @return the path of the parameters
31 @Parameters(name
= "{index}: path {0}")
32 public static Collection
<Object
[]> getFiles() {
33 File
[] validFiles
= (new File(pathname
)).listFiles();
34 Collection
<Object
[]> params
= new ArrayList
<Object
[]>();
35 for (File f
: validFiles
) {
36 Object
[] arr
= new Object
[] { f
.getAbsolutePath() };
43 * Test all the invalid xml files
46 public void testValid() {
47 IStatus valid
= getTrace().validate(null, getPath());
48 if (IStatus
.OK
!= valid
.getSeverity()) {
49 fail(valid
.toString());
59 public CustomXmlTraceValidTest(String filePath
) {
60 this.setPath(filePath
);
This page took 0.034877 seconds and 6 git commands to generate.