Skip to content

Commit

Permalink
Added unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Oct 19, 2024
1 parent dd9d20d commit aa09d67
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,26 @@ void evaluateResult(@NonNull ExitStatus status, @NonNull ExitCode expectedCode,
}

private static Stream<Arguments> providesValues() {
@SuppressWarnings("serial") List<Arguments> values = new LinkedList<>() {
@SuppressWarnings("serial")
List<Arguments> values = new LinkedList<>() {
{
add(Arguments.of(new String[] {}, ExitCode.INVALID_COMMAND,
NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "-h" }, ExitCode.OK, NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "generate-schema", "--help" }, ExitCode.OK,
NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "generate-diagram", "--help" }, ExitCode.OK,
NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "validate", "--help" }, ExitCode.OK,
NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "validate-content", "--help" }, ExitCode.OK,
NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "convert", "--help" }, ExitCode.OK,
NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "metapath", "list-functions", "--help" }, ExitCode.OK,
NO_EXCEPTION_CLASS));
add(Arguments.of(new String[] { "metapath", "eval", "--help" }, ExitCode.OK,
NO_EXCEPTION_CLASS));
add(Arguments.of(
new String[] { "validate",
"../databind/src/test/resources/metaschema/fields_with_flags/metaschema.xml"
Expand Down Expand Up @@ -163,6 +172,14 @@ private static Stream<Arguments> providesValues() {
add(Arguments.of(
new String[] { "metapath", "list-functions" },
ExitCode.OK, NO_EXCEPTION_CLASS));
add(Arguments.of(
new String[] { "convert",
"-m",
"../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml",
"--to=yaml",
"../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml",
},
ExitCode.OK, NO_EXCEPTION_CLASS));
}
};

Expand Down

0 comments on commit aa09d67

Please sign in to comment.