Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
429 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
package apps; | ||
|
||
import java.io.File; | ||
import java.util.stream.Stream; | ||
|
||
import jmri.configurexml.SchemaTestBase; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.junit.runners.Parameterized.Parameters; | ||
|
||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
|
||
/** | ||
* Test upper level loading of config files | ||
* | ||
* @author Bob Jacobsen Copyright 2012 | ||
* @since 2.5.5 | ||
*/ | ||
@RunWith(Parameterized.class) | ||
public class ValidateConfigFilesTest extends SchemaTestBase { | ||
|
||
@Parameters(name = "{0} (pass={1})") | ||
public static Iterable<Object[]> data() { | ||
public static Stream<Arguments> data() { | ||
return getFiles(new File("xml/config"), true, true); | ||
} | ||
|
||
public ValidateConfigFilesTest(File file, boolean pass) { | ||
super(file, pass); | ||
@ParameterizedTest | ||
@MethodSource("data") | ||
public void validateConfigFiles(File file, boolean pass) { | ||
super.validate(file, pass); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
package jmri; | ||
|
||
import java.io.File; | ||
import java.util.stream.Stream; | ||
|
||
import jmri.configurexml.SchemaTestBase; | ||
|
||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.junit.runners.Parameterized.Parameters; | ||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
|
||
/** | ||
* Checks of JMRI ml/sample files; here because where else would you put it? | ||
* | ||
* @author Bob Jacobsen Copyright 2009, 2016 | ||
* @since 4.3.3 | ||
*/ | ||
@RunWith(Parameterized.class) | ||
public class SchemaTest extends SchemaTestBase { | ||
|
||
@Parameters(name = "{0} (pass={1})") | ||
public static Iterable<Object[]> data() { | ||
public static Stream<Arguments> data() { | ||
// the following are just tested for schema pass/fail, not load/store | ||
// could recurse, but xml/samples/javaone/Throttles.xml fails | ||
// (was not tested prior to 4.7.1) | ||
return getFiles(new File("xml/samples"), false, true); | ||
} | ||
|
||
public SchemaTest(File file, boolean pass) { | ||
super(file, pass); | ||
@ParameterizedTest | ||
@MethodSource("data") | ||
public void schemaTest(File file, boolean pass) { | ||
super.validate(file, pass); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
package jmri.configurexml; | ||
|
||
import java.io.File; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.junit.runners.Parameterized.Parameters; | ||
import java.util.stream.Stream; | ||
|
||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
|
||
/** | ||
* Checks of JMRI XML Schema | ||
* | ||
* @author Bob Jacobsen Copyright 2009 | ||
* @since 2.5.5 | ||
*/ | ||
@RunWith(Parameterized.class) | ||
public class SchemaTest extends SchemaTestBase { | ||
|
||
@Parameters(name = "{0} (pass={1})") | ||
public static Iterable<Object[]> data() { | ||
public static Stream<Arguments> data() { | ||
return setTestFilesBelowThisPath("java/test/jmri/configurexml"); | ||
} | ||
|
||
public SchemaTest(File file, boolean pass) { | ||
super(file, pass); | ||
@ParameterizedTest | ||
@MethodSource("data") | ||
public void schemaTest(File file, boolean pass) { | ||
super.validate(file, pass); | ||
} | ||
} |
Oops, something went wrong.