Skip to content

Commit

Permalink
Corrections to unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez authored and david-waltermire committed Aug 16, 2019
1 parent 97a249c commit 6a18ab5
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@
"title": "Plain text",
"description": "plain text, no markup",
"$id": "#/definitions/field-flag-plaintext",
"type": "object",
"properties": {
"length": {
"title": "Length",
"description": "The length.",
"type": "integer",
"minimum": 1
"minimum": 1,
"multipleOf": 1.0
},
"STRVALUE": {
"type": "string"
}
}
"STRVALUE": {"type": "string"}
},
"required": ["STRVALUE"],
"additionalProperties": false
},
"field-richtext": {
"title": "Rich text",
Expand All @@ -59,56 +61,46 @@
"title": "Rich text",
"description": "Rich text supports markup",
"$id": "#/definitions/field-flag-richtext",
"type": "object",
"properties": {
"length": {
"title": "Length",
"description": "The length.",
"type": "integer",
"multipleOf": 1.0,
"minimum": 1
},
"RICHTEXT": {
"type": "string"
}
}
"RICHTEXT": {"type": "string"}
},
"required": ["RICHTEXT"],
"additionalProperties": false
},
"field-prose": {
"title": "Prose",
"description": "Prose permits multiple paragraphs, lists, tables etc.",
"$id": "#/definitions/field-prose",
"oneOf": [
{"type": "string"},
{
"type": "array",
"items": {"type": "string"},
"minItems": 2
}
]
"type": "string"
},
"field-flag-prose": {
"title": "Prose",
"description": "Prose permits multiple paragraphs, lists, tables etc.",
"$id": "#/definitions/field-flag-prose",
"type" : "object",
"properties": {
"length": {
"title": "Length",
"description": "The length.",
"type": "integer",
"multipleOf": 1.0,
"minimum": 1
},
"PROSE": {
"oneOf": [
{"type": "string"},
{
"type": "array",
"items": {"type": "string"},
"minItems": 2
}
]
}
}
"PROSE": {"type": "string"}
},
"required": ["PROSE"],
"additionalProperties": false
}
},
"properties": {
"parent": {"$ref": "#/definitions/parent"}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"parent": {
"date": "2019-07-08TZ",
"plaintext": "Some *plain* text",
"richtext": "Some *rich* text",
"prose": [ "Here's some *extra prose*" ]
"field-date": "2019-07-08TZ",
"field-plaintext": "Some *plain* text",
"field-richtext": "Some *rich* text",
"field-prose": "Here's some *extra prose*"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://csrc.nist.gov/ns/oscal/unit-testing/flag-basic-schema.json",
"$comment": "Metaschema Unit Test: flag: basic flag",
"$comment": "Metaschema Unit Test: flag: basic flag: JSON Schema",
"type": "object",
"definitions": {
"parent": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0"
xmlns:o="http://csrc.nist.gov/ns/oscal/example"
root="parent">
<schema-name>Metaschema Unit Test: group-as</schema-name>
<schema-name>Metaschema Unit Test: flag: basic flag</schema-name>
<schema-version>1.0-milestone1</schema-version>
<short-name>metaschema-group-as</short-name>
<namespace>http://csrc.nist.gov/ns/oscal/unit-testing/flag-basic</namespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parent": {
"props": {
"id3": {"STRVALUE": "test3"},
"id3": {"STRVALUE": ""},
"id2": {"STRVALUE": ""},
"id1": {"STRVALUE": "test1"}
}
}
Expand Down

0 comments on commit 6a18ab5

Please sign in to comment.