diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/expected.json new file mode 100644 index 00000000..6a4aff11 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/expected.json @@ -0,0 +1,15 @@ +{ + "animals" : [ "mammal", "bird", "fish" ] +} +{ + "animals" : [ "bird", "fish" ] +} +{ + "animals" : [ "mammal" ] +} +{ + "animals" : [ "mammal", "fish" ] +} +{ + "animals" : [ ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/input.json new file mode 100644 index 00000000..ca6c661f --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/input.json @@ -0,0 +1,15 @@ +{ + "animals" : [ "dog", "parrot", "shark" ] +} +{ + "animals" : [ "human", "parrot", "shark" ] +} +{ + "animals" : [ "dog" ] +} +{ + "animals" : [ "dog", "human", "shark" ] +} +{ + "animals" : [ "human" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/mapfile.tsv b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/mapfile.tsv new file mode 100644 index 00000000..e7f9756a --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/mapfile.tsv @@ -0,0 +1,6 @@ +dog mammal +cat mammal +parrot bird +shark fish +dragon fictional animal +unicorn fictional animal diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/test.fix new file mode 100644 index 00000000..a069a35e --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/test.fix @@ -0,0 +1 @@ +lookup("animals[].*", "./mapfile.tsv", "sep_char":"\t", delete:"true") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsDeleteNotMatchingValues/test.flux @@ -0,0 +1,8 @@ +FLUX_DIR + "input.json" +|open-file +|as-records +|decode-json +|fix(FLUX_DIR + "test.fix") +|encode-json(prettyPrinting="true") +|write(FLUX_DIR + "output-metafix.json") +; diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/expected.json index 21df8890..1020784f 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/expected.json +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/expected.json @@ -2,8 +2,14 @@ "animals" : [ "mammal", "bird", "fish" ] } { - "animals" : [ "human" ] + "animals" : [ "human", "bird", "fish" ] } { "animals" : [ "mammal" ] } +{ + "animals" : [ "mammal", "human", "fish" ] +} +{ + "animals" : [ "human" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/input.json index 8a210994..ca6c661f 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/input.json +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInArrayOfStringsWithNotMatchingValues/input.json @@ -2,8 +2,14 @@ "animals" : [ "dog", "parrot", "shark" ] } { - "animals" : [ "human" ] + "animals" : [ "human", "parrot", "shark" ] } { "animals" : [ "dog" ] } +{ + "animals" : [ "dog", "human", "shark" ] +} +{ + "animals" : [ "human" ] +}