Skip to content

Commit

Permalink
fixes #54 add v6 and v7 test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehu committed Nov 15, 2019
1 parent 0ea1128 commit cc0c136
Show file tree
Hide file tree
Showing 2 changed files with 522 additions and 2 deletions.
211 changes: 210 additions & 1 deletion src/test/java/com/networknt/schema/V6JsonSchemaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.undertow.server.handlers.resource.FileResourceManager;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

import java.io.File;
Expand Down Expand Up @@ -106,8 +107,216 @@ private void runTestFile(String testCaseFile) throws Exception {
}

@Test
public void testBignumValidator() throws Exception {
public void testOptionalBignumValidator() throws Exception {
runTestFile("draft6/optional/bignum.json");
}

@Test
@Ignore
public void testEcmascriptRegexValidator() throws Exception {
runTestFile("draft6/optional/ecmascript-regex.json");
}

@Test
@Ignore
public void testZeroTerminatedFloatsValidator() throws Exception {
runTestFile("draft6/optional/zeroTerminatedFloats.json");
}

@Test
@Ignore
public void testOptionalFormatValidator() throws Exception {
runTestFile("draft6/optional/format.json");
}

@Test
public void testAdditionalItemsValidator() throws Exception {
runTestFile("draft6/additionalItems.json");
}

@Test
public void testAdditionalPropertiesValidator() throws Exception {
runTestFile("draft6/additionalProperties.json");
}

@Test
@Ignore
public void testAllOfValidator() throws Exception {
runTestFile("draft6/allOf.json");
}

@Test
@Ignore
public void testAnyOfValidator() throws Exception {
runTestFile("draft6/anyOf.json");
}

@Test
@Ignore
public void testBooleanSchemaValidator() throws Exception {
runTestFile("draft6/boolean_schema.json");
}

@Test
@Ignore
public void testConstValidator() throws Exception {
runTestFile("draft6/const.json");
}

@Test
@Ignore
public void testContainsValidator() throws Exception {
runTestFile("draft6/contains.json");
}

@Test
public void testDefaultValidator() throws Exception {
runTestFile("draft6/default.json");
}

@Test
public void testDefinitionsValidator() throws Exception {
runTestFile("draft6/definitions.json");
}

@Test
@Ignore
public void testDependenciesValidator() throws Exception {
runTestFile("draft6/dependencies.json");
}

@Test
@Ignore
public void testEnumValidator() throws Exception {
runTestFile("draft6/enum.json");
}

@Test
public void testExclusiveMaximumValidator() throws Exception {
runTestFile("draft6/exclusiveMaximum.json");
}

@Test
public void testExclusiveMinimumValidator() throws Exception {
runTestFile("draft6/exclusiveMinimum.json");
}

@Test
public void testFormatValidator() throws Exception {
runTestFile("draft6/format.json");
}

@Test
@Ignore
public void testItemsValidator() throws Exception {
runTestFile("draft6/items.json");
}

@Test
public void testMaximumValidator() throws Exception {
runTestFile("draft6/maximum.json");
}

@Test
public void testMaxItemsValidator() throws Exception {
runTestFile("draft6/maxItems.json");
}

@Test
public void testMaxLengthValidator() throws Exception {
runTestFile("draft6/maxLength.json");
}

@Test
public void testMaxPropertiesValidator() throws Exception {
runTestFile("draft6/maxProperties.json");
}

@Test
public void testMinimumValidator() throws Exception {
runTestFile("draft6/minimum.json");
}

@Test
public void testMinItemsValidator() throws Exception {
runTestFile("draft6/minItems.json");
}

@Test
public void testMinLengthValidator() throws Exception {
runTestFile("draft6/minLength.json");
}

@Test
public void testMinPropertiesValidator() throws Exception {
runTestFile("draft6/minProperties.json");
}

@Test
public void testMultipleOfValidator() throws Exception {
runTestFile("draft6/multipleOf.json");
}

@Test
@Ignore
public void testNotValidator() throws Exception {
runTestFile("draft6/not.json");
}

@Test
@Ignore
public void testOneOfValidator() throws Exception {
runTestFile("draft6/oneOf.json");
}

@Test
public void testPatternValidator() throws Exception {
runTestFile("draft6/pattern.json");
}

@Test
@Ignore
public void testPatternPropertiesValidator() throws Exception {
runTestFile("draft6/patternProperties.json");
}

@Test
@Ignore
public void testPropertiesValidator() throws Exception {
runTestFile("draft6/properties.json");
}

@Test
@Ignore
public void testPropertyNamesValidator() throws Exception {
runTestFile("draft6/propertyNames.json");
}

@Test
@Ignore
public void testRefValidator() throws Exception {
runTestFile("draft6/ref.json");
}

@Test
@Ignore
public void testRefRemoteValidator() throws Exception {
runTestFile("draft6/refRemote.json");
}

@Test
public void testRequiredValidator() throws Exception {
runTestFile("draft6/required.json");
}

@Test
public void testTypeValidator() throws Exception {
runTestFile("draft6/type.json");
}

@Test
public void testUniqueItemsValidator() throws Exception {
runTestFile("draft6/uniqueItems.json");
}

}
Loading

0 comments on commit cc0c136

Please sign in to comment.