Skip to content

Commit 88de88c

Browse files
committed
tests(Java) 1.7
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 0a978ea commit 88de88c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: tools/src/test/java/org/cyclonedx/schema/JsonSchemaVerificationTest.java

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class JsonSchemaVerificationTest extends BaseSchemaVerificationTest {
5353
private static final JsonSchema VERSION_14;
5454
private static final JsonSchema VERSION_15;
5555
private static final JsonSchema VERSION_16;
56+
private static final JsonSchema VERSION_17;
5657

5758
static {
5859
JsonMetaSchemaFactory metaSchemaFactory = new DefaultJsonMetaSchemaFactory() {
@@ -75,6 +76,7 @@ public JsonMetaSchema getMetaSchema(
7576
VERSION_14 = factory.getSchema(SchemaLocation.of("classpath:bom-1.4.schema.json"));
7677
VERSION_15 = factory.getSchema(SchemaLocation.of("classpath:bom-1.5.schema.json"));
7778
VERSION_16 = factory.getSchema(SchemaLocation.of("classpath:bom-1.6.schema.json"));
79+
VERSION_17 = factory.getSchema(SchemaLocation.of("classpath:bom-1.7.schema.json"));
7880
}
7981

8082
private static JsonMetaSchema addCustomKeywords(JsonMetaSchema metaSchema) {
@@ -134,6 +136,9 @@ private JsonSchema getSchema(String resourceName) {
134136
if (resourceName.endsWith("-1.6.json")) {
135137
return VERSION_16;
136138
}
139+
if (resourceName.endsWith("-1.7.json")) {
140+
return VERSION_17;
141+
}
137142
return null;
138143
}
139144
}

Diff for: tools/src/test/java/org/cyclonedx/schema/XmlSchemaVerificationTest.java

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class XmlSchemaVerificationTest extends BaseSchemaVerificationTest {
4040
private static final Schema VERSION_14;
4141
private static final Schema VERSION_15;
4242
private static final Schema VERSION_16;
43+
private static final Schema VERSION_17;
4344

4445
static {
4546
try {
@@ -57,6 +58,7 @@ public class XmlSchemaVerificationTest extends BaseSchemaVerificationTest {
5758
VERSION_14 = factory.newSchema(cl.getResource("bom-1.4.xsd"));
5859
VERSION_15 = factory.newSchema(cl.getResource("bom-1.5.xsd"));
5960
VERSION_16 = factory.newSchema(cl.getResource("bom-1.6.xsd"));
61+
VERSION_17 = factory.newSchema(cl.getResource("bom-1.7.xsd"));
6062
} catch (SAXException e) {
6163
throw new IllegalStateException(e);
6264
}
@@ -146,6 +148,9 @@ private Schema getSchema(String resourceName) {
146148
if (resourceName.endsWith("-1.6.xml")) {
147149
return VERSION_16;
148150
}
151+
if (resourceName.endsWith("-1.7.xml")) {
152+
return VERSION_17;
153+
}
149154
return null;
150155
}
151156
}

0 commit comments

Comments
 (0)