From 7767b05e38ef6fc00780a19925416329c97db07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 11 Feb 2018 12:31:54 +0100 Subject: [PATCH] Enhancement: Add test cases --- .../{ => IsGeneric}/normalized.json | 0 .../{ => IsGeneric}/original.json | 0 .../{ => IsGeneric}/schema.json | 0 .../IsSequence/normalized.json | 6 ++++++ .../IsSequence/original.json | 6 ++++++ .../WithItemDefinition/IsSequence/schema.json | 19 +++++++++++++++++++ .../WithoutItemDefinition/normalized.json | 6 ++++++ .../WithoutItemDefinition/original.json | 6 ++++++ .../IsArray/WithoutItemDefinition/schema.json | 5 +++++ .../{ => IsGeneric}/normalized.json | 0 .../{ => IsGeneric}/original.json | 0 .../{ => IsGeneric}/schema.json | 0 .../IsSequence/normalized.json | 6 ++++++ .../IsSequence/original.json | 6 ++++++ .../WithItemDefinition/IsSequence/schema.json | 17 +++++++++++++++++ .../WithoutItemDefinition/normalized.json | 10 ++++------ .../WithoutItemDefinition/original.json | 10 ++++------ .../IsArray/Schema/IsEmpty/normalized.json | 6 ++++++ .../Data/IsArray/Schema/IsEmpty/original.json | 6 ++++++ .../Data/IsArray/Schema/IsEmpty/schema.json | 1 + 20 files changed, 98 insertions(+), 12 deletions(-) rename test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/{ => IsGeneric}/normalized.json (100%) rename test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/{ => IsGeneric}/original.json (100%) rename test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/{ => IsGeneric}/schema.json (100%) create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/normalized.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/original.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/schema.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/normalized.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/original.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/schema.json rename test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/{ => IsGeneric}/normalized.json (100%) rename test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/{ => IsGeneric}/original.json (100%) rename test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/{ => IsGeneric}/schema.json (100%) create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/normalized.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/original.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/schema.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/normalized.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/original.json create mode 100644 test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/schema.json diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/normalized.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsGeneric/normalized.json similarity index 100% rename from test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/normalized.json rename to test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsGeneric/normalized.json diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/original.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsGeneric/original.json similarity index 100% rename from test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/original.json rename to test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsGeneric/original.json diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/schema.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsGeneric/schema.json similarity index 100% rename from test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/schema.json rename to test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsGeneric/schema.json diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/normalized.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/normalized.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/normalized.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/original.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/original.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/original.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/schema.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/schema.json new file mode 100644 index 00000000..98850b0f --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithItemDefinition/IsSequence/schema.json @@ -0,0 +1,19 @@ +{ + "type": [ + "array" + ], + "items": [ + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] +} diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/normalized.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/normalized.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/normalized.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/original.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/original.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/original.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/schema.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/schema.json new file mode 100644 index 00000000..a6b1cbc3 --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsArray/WithoutItemDefinition/schema.json @@ -0,0 +1,5 @@ +{ + "type": [ + "array" + ] +} diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/normalized.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsGeneric/normalized.json similarity index 100% rename from test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/normalized.json rename to test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsGeneric/normalized.json diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/original.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsGeneric/original.json similarity index 100% rename from test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/original.json rename to test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsGeneric/original.json diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/schema.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsGeneric/schema.json similarity index 100% rename from test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/schema.json rename to test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsGeneric/schema.json diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/normalized.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/normalized.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/normalized.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/original.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/original.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/original.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/schema.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/schema.json new file mode 100644 index 00000000..2e6095d9 --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithItemDefinition/IsSequence/schema.json @@ -0,0 +1,17 @@ +{ + "type": "array", + "items": [ + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] +} diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/normalized.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/normalized.json index d8988895..c80d6a8c 100644 --- a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/normalized.json +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/normalized.json @@ -1,8 +1,6 @@ [ - { - "baz": 9000 - }, - { - "baz": 9001 - } + 9001, + "foo", + false, + null ] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/original.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/original.json index d8988895..c80d6a8c 100644 --- a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/original.json +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/HasType/IsScalar/WithoutItemDefinition/original.json @@ -1,8 +1,6 @@ [ - { - "baz": 9000 - }, - { - "baz": 9001 - } + 9001, + "foo", + false, + null ] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/normalized.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/normalized.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/normalized.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/original.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/original.json new file mode 100644 index 00000000..c80d6a8c --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/original.json @@ -0,0 +1,6 @@ +[ + 9001, + "foo", + false, + null +] diff --git a/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/schema.json b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/schema.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/test/Fixture/SchemaNormalizer/NormalizeNormalizes/Data/IsArray/Schema/IsEmpty/schema.json @@ -0,0 +1 @@ +{}