Added issuer with compact iri test
This commit is contained in:
parent
d852003526
commit
6eb8b66560
@ -59,12 +59,11 @@ public class OB20Tests {
|
||||
|
||||
@Test
|
||||
void testSimpleBadgeClassJsonValid() {
|
||||
// TODO: commented out due to lack of prerequisite tasks yet
|
||||
// assertDoesNotThrow(()->{
|
||||
// Report report = validator.run(Samples.OB20.JSON.SIMPLE_BADGECLASS.asFileResource());
|
||||
// if(verbose) PrintHelper.print(report, true);
|
||||
// assertValid(report);
|
||||
// });
|
||||
assertDoesNotThrow(()->{
|
||||
Report report = validator.run(Samples.OB20.JSON.SIMPLE_BADGECLASS.asFileResource());
|
||||
if(verbose) PrintHelper.print(report, true);
|
||||
assertValid(report);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -118,6 +117,15 @@ public class OB20Tests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCompactIriInIssuer() {
|
||||
assertDoesNotThrow(()->{
|
||||
Report report = validator.run(Samples.OB20.JSON.ISSUER_COMPACTIRI_VALIDATION.asFileResource());
|
||||
if(verbose) PrintHelper.print(report, true);
|
||||
assertValid(report);
|
||||
});
|
||||
}
|
||||
|
||||
@Nested
|
||||
static class WarningTests {
|
||||
@BeforeAll
|
||||
|
@ -55,6 +55,8 @@ public class Samples {
|
||||
public final static Sample WARNING_ISSUER_NON_HTTPS_JSON = new Sample("ob20/warning-issuer-non-http.json", true);
|
||||
// original: test_validation: test_can_input_badgeclass
|
||||
public final static Sample SIMPLE_BADGECLASS = new Sample("ob20/assets/badgeclass1.json", true);
|
||||
// original: test_validation: test_validate_compacted_iri_value
|
||||
public final static Sample ISSUER_COMPACTIRI_VALIDATION = new Sample("ob20/issuer-compact-iri-validation.json", true);
|
||||
// original: validate_language: validate_language_prop_basic
|
||||
public final static Sample SIMPLE_LANGUAGE_BADGECLASS = new Sample("ob20/badge-class-with-language.json", true);
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"@context": "https://w3id.org/openbadges/v2",
|
||||
"type": "Issuer",
|
||||
"id": "https://example.org/organization.json",
|
||||
"url": "https://example.org",
|
||||
"name": "An Example Badge Issuer",
|
||||
"email": "contact@example.org",
|
||||
"verification": {
|
||||
"verificationProperty": "id"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user