From fd33f24fb2845592e612240587779b84fe6f6234 Mon Sep 17 00:00:00 2001 From: StrongestNumber9 <16169054+StrongestNumber9@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:24:01 +0200 Subject: [PATCH] Adds bunch of test lookup tables --- src/test/resources/bad/nomatch_missing.json | 4 ++++ src/test/resources/bad/table_null.json | 5 +++++ src/test/resources/bad/table_object.json | 7 +++++++ src/test/resources/bad/table_string.json | 5 +++++ src/test/resources/bad/type_missing.json | 4 ++++ src/test/resources/bad/type_wrong.json | 5 +++++ src/test/resources/bad/value_array.json | 14 ++++++++++++++ src/test/resources/bad/value_bool.json | 14 ++++++++++++++ src/test/resources/bad/value_int.json | 18 ++++++++++++++++++ src/test/resources/bad/value_null.json | 10 ++++++++++ src/test/resources/bad/value_object.json | 12 ++++++++++++ src/test/resources/good/array.json | 18 ++++++++++++++++++ src/test/resources/good/array_empty.json | 5 +++++ src/test/resources/good/sparsearray.json | 18 ++++++++++++++++++ src/test/resources/good/sparsearray_empty.json | 5 +++++ src/test/resources/good/string.json | 18 ++++++++++++++++++ src/test/resources/good/string_empty.json | 5 +++++ 17 files changed, 167 insertions(+) create mode 100644 src/test/resources/bad/nomatch_missing.json create mode 100644 src/test/resources/bad/table_null.json create mode 100644 src/test/resources/bad/table_object.json create mode 100644 src/test/resources/bad/table_string.json create mode 100644 src/test/resources/bad/type_missing.json create mode 100644 src/test/resources/bad/type_wrong.json create mode 100644 src/test/resources/bad/value_array.json create mode 100644 src/test/resources/bad/value_bool.json create mode 100644 src/test/resources/bad/value_int.json create mode 100644 src/test/resources/bad/value_null.json create mode 100644 src/test/resources/bad/value_object.json create mode 100644 src/test/resources/good/array.json create mode 100644 src/test/resources/good/array_empty.json create mode 100644 src/test/resources/good/sparsearray.json create mode 100644 src/test/resources/good/sparsearray_empty.json create mode 100644 src/test/resources/good/string.json create mode 100644 src/test/resources/good/string_empty.json diff --git a/src/test/resources/bad/nomatch_missing.json b/src/test/resources/bad/nomatch_missing.json new file mode 100644 index 0000000..562cf91 --- /dev/null +++ b/src/test/resources/bad/nomatch_missing.json @@ -0,0 +1,4 @@ +{ + "type": "string", + "table": [] +} diff --git a/src/test/resources/bad/table_null.json b/src/test/resources/bad/table_null.json new file mode 100644 index 0000000..f4a4651 --- /dev/null +++ b/src/test/resources/bad/table_null.json @@ -0,0 +1,5 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": null +} diff --git a/src/test/resources/bad/table_object.json b/src/test/resources/bad/table_object.json new file mode 100644 index 0000000..e606444 --- /dev/null +++ b/src/test/resources/bad/table_object.json @@ -0,0 +1,7 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": { + "invalid": true + } +} diff --git a/src/test/resources/bad/table_string.json b/src/test/resources/bad/table_string.json new file mode 100644 index 0000000..59e4287 --- /dev/null +++ b/src/test/resources/bad/table_string.json @@ -0,0 +1,5 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": "lookup" +} diff --git a/src/test/resources/bad/type_missing.json b/src/test/resources/bad/type_missing.json new file mode 100644 index 0000000..1457b24 --- /dev/null +++ b/src/test/resources/bad/type_missing.json @@ -0,0 +1,4 @@ +{ + "nomatch": "unknown", + "table": [] +} diff --git a/src/test/resources/bad/type_wrong.json b/src/test/resources/bad/type_wrong.json new file mode 100644 index 0000000..dca40d6 --- /dev/null +++ b/src/test/resources/bad/type_wrong.json @@ -0,0 +1,5 @@ +{ + "nomatch": "unknown", + "type": "object", + "table": [] +} diff --git a/src/test/resources/bad/value_array.json b/src/test/resources/bad/value_array.json new file mode 100644 index 0000000..ecaac7d --- /dev/null +++ b/src/test/resources/bad/value_array.json @@ -0,0 +1,14 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": [ + { + "index": "numbers", + "value": [ + 1, + 3, + 5 + ] + } + ] +} diff --git a/src/test/resources/bad/value_bool.json b/src/test/resources/bad/value_bool.json new file mode 100644 index 0000000..5ba04c4 --- /dev/null +++ b/src/test/resources/bad/value_bool.json @@ -0,0 +1,14 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": [ + { + "index": "yes", + "value": true + }, + { + "index": "no", + "value": false + } + ] +} diff --git a/src/test/resources/bad/value_int.json b/src/test/resources/bad/value_int.json new file mode 100644 index 0000000..1765569 --- /dev/null +++ b/src/test/resources/bad/value_int.json @@ -0,0 +1,18 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": [ + { + "index": "one", + "value": 1 + }, + { + "index": "two", + "value": 2 + }, + { + "index": "three", + "value": 3 + } + ] +} diff --git a/src/test/resources/bad/value_null.json b/src/test/resources/bad/value_null.json new file mode 100644 index 0000000..c73a869 --- /dev/null +++ b/src/test/resources/bad/value_null.json @@ -0,0 +1,10 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": [ + { + "index": "gone", + "value": null + } + ] +} diff --git a/src/test/resources/bad/value_object.json b/src/test/resources/bad/value_object.json new file mode 100644 index 0000000..480fbac --- /dev/null +++ b/src/test/resources/bad/value_object.json @@ -0,0 +1,12 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": [ + { + "index": "object", + "value": { + "invalid": true + } + } + ] +} diff --git a/src/test/resources/good/array.json b/src/test/resources/good/array.json new file mode 100644 index 0000000..3aa4b29 --- /dev/null +++ b/src/test/resources/good/array.json @@ -0,0 +1,18 @@ +{ + "nomatch": "unknown", + "type": "array", + "table": [ + { + "index": 1, + "value": "un" + }, + { + "index": 2, + "value": "deux" + }, + { + "index": 3, + "value": "trois" + } + ] +} diff --git a/src/test/resources/good/array_empty.json b/src/test/resources/good/array_empty.json new file mode 100644 index 0000000..d447522 --- /dev/null +++ b/src/test/resources/good/array_empty.json @@ -0,0 +1,5 @@ +{ + "nomatch": "unknown", + "type": "array", + "table": [] +} diff --git a/src/test/resources/good/sparsearray.json b/src/test/resources/good/sparsearray.json new file mode 100644 index 0000000..643040b --- /dev/null +++ b/src/test/resources/good/sparsearray.json @@ -0,0 +1,18 @@ +{ + "nomatch": "unknown", + "type": "sparseArray", + "table": [ + { + "index": "3", + "value": "trois" + }, + { + "index": "5", + "value": "cinq" + }, + { + "index": "10", + "value": "dix" + } + ] +} diff --git a/src/test/resources/good/sparsearray_empty.json b/src/test/resources/good/sparsearray_empty.json new file mode 100644 index 0000000..340d4fb --- /dev/null +++ b/src/test/resources/good/sparsearray_empty.json @@ -0,0 +1,5 @@ +{ + "nomatch": "unknown", + "type": "sparseArray", + "table": [] +} diff --git a/src/test/resources/good/string.json b/src/test/resources/good/string.json new file mode 100644 index 0000000..3108c70 --- /dev/null +++ b/src/test/resources/good/string.json @@ -0,0 +1,18 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": [ + { + "index": "one", + "value": "un" + }, + { + "index": "two", + "value": "deux" + }, + { + "index": "three", + "value": "trois" + } + ] +} diff --git a/src/test/resources/good/string_empty.json b/src/test/resources/good/string_empty.json new file mode 100644 index 0000000..8676ec0 --- /dev/null +++ b/src/test/resources/good/string_empty.json @@ -0,0 +1,5 @@ +{ + "nomatch": "unknown", + "type": "string", + "table": [] +}