From 92954a0cf27787a4f1c6ec4ad805f53e20c587bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Tue, 1 Mar 2022 17:41:10 +0100 Subject: [PATCH 1/5] Add integration test for #121 --- .../expected.json | 4 ++++ .../move_fieldFromArrayOfStringsWithAsterisk/input.json | 4 ++++ .../move_fieldFromArrayOfStringsWithAsterisk/test.fix | 1 + .../move_fieldFromArrayOfStringsWithAsterisk/test.flux | 8 ++++++++ .../expected.json | 3 +++ .../replace_AllFromArrayOfStringsWithAsterisk/input.json | 3 +++ .../replace_AllFromArrayOfStringsWithAsterisk/test.fix | 1 + .../replace_AllFromArrayOfStringsWithAsterisk/test.flux | 8 ++++++++ 8 files changed, 32 insertions(+) create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/expected.json new file mode 100644 index 00000000..3791064c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/expected.json @@ -0,0 +1,4 @@ +{ + "key" : [ ], + "words" : [ "value", "more_value", "even_more_value" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/input.json new file mode 100644 index 00000000..5cf962f7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/input.json @@ -0,0 +1,4 @@ +{ + "key" : [ "value", "more_value", "even_more_value" ], + "words" : [ ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.fix new file mode 100644 index 00000000..b0b9e3c7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.fix @@ -0,0 +1 @@ +move_field("key[].*", "words[].$append") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/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/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json new file mode 100644 index 00000000..3784e98d --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json @@ -0,0 +1,3 @@ +{ + "key" : [ "value", "m__re_value", "even_m__re_value" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json new file mode 100644 index 00000000..160261df --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json @@ -0,0 +1,3 @@ +{ + "key" : [ "value", "more_value", "even_more_value" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix new file mode 100644 index 00000000..0f50b7d8 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix @@ -0,0 +1 @@ +replace_all("test[].*", "o", "__") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/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") +; From 73be68397c4107a7df4f34f648c83dde36aff4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 2 Mar 2022 11:15:23 +0100 Subject: [PATCH 2/5] Update and add integration tests for #121 and for the functions that are discussed in #121 --- .../expected.json | 3 +++ .../input.json | 3 +++ .../join_fieldSimpleAndChangeToArray/test.fix | 2 ++ .../test.flux | 0 .../toJson/renameInObject/expected.json | 18 ++++++++++++++++++ .../fromJson/toJson/renameInObject/input.json | 18 ++++++++++++++++++ .../fromJson/toJson/renameInObject/test.fix | 2 ++ .../fromJson/toJson/renameInObject/test.flux | 8 ++++++++ .../expected.json | 0 .../input.json | 0 .../test.fix | 1 + .../test.flux | 8 ++++++++ .../expected.json | 12 ++++++++++++ .../input.json | 12 ++++++++++++ .../test.fix | 1 + .../test.flux | 8 ++++++++ .../toJson/replace_allSimple/expected.json | 3 +++ .../toJson/replace_allSimple/input.json | 3 +++ .../fromJson/toJson/replace_allSimple/test.fix | 1 + .../toJson/replace_allSimple/test.flux | 8 ++++++++ .../toJson/reverseArrayOfStrings/disabled.txt | 1 + .../toJson/reverseArrayOfStrings/expected.json | 3 +++ .../toJson/reverseArrayOfStrings/input.json | 3 +++ .../toJson/reverseArrayOfStrings/test.fix | 1 + .../toJson/reverseArrayOfStrings/test.flux | 8 ++++++++ .../toJson/reverseSimpleField/expected.json | 7 +++++++ .../toJson/reverseSimpleField/input.json | 7 +++++++ .../toJson/reverseSimpleField/test.fix | 2 ++ .../toJson/reverseSimpleField/test.flux | 8 ++++++++ .../disabled.txt | 1 + .../expected.json | 12 ++++++++++++ .../reverseSubfieldInArrayOfObjects/input.json | 12 ++++++++++++ .../reverseSubfieldInArrayOfObjects/test.fix | 1 + .../reverseSubfieldInArrayOfObjects/test.flux | 8 ++++++++ .../reverseValuesInArrayOfStrings/disabled.txt | 1 + .../expected.json | 3 +++ .../reverseValuesInArrayOfStrings/input.json | 3 +++ .../reverseValuesInArrayOfStrings/test.fix | 1 + .../reverseValuesInArrayOfStrings/test.flux | 8 ++++++++ .../toJson/split_fieldSimple/expected.json | 5 +++++ .../toJson/split_fieldSimple/input.json | 3 +++ .../fromJson/toJson/split_fieldSimple/test.fix | 1 + .../toJson/split_fieldSimple/test.flux | 8 ++++++++ .../disabled.txt | 1 + .../expected.json | 15 +++++++++++++++ .../input.json | 11 +++++++++++ .../test.fix | 1 + .../test.flux | 8 ++++++++ .../split_fieldSubfieldInObject/expected.json | 7 +++++++ .../split_fieldSubfieldInObject/input.json | 5 +++++ .../split_fieldSubfieldInObject/test.fix | 1 + .../split_fieldSubfieldInObject/test.flux | 8 ++++++++ .../disabled.txt | 2 +- .../copy_fieldArrayOfObject/expected.json | 16 ++++++++++++++++ .../toJson/copy_fieldArrayOfObject/input.json | 9 +++++++++ .../toJson/copy_fieldArrayOfObject/test.fix | 1 + .../toJson/copy_fieldArrayOfObject/test.flux | 8 ++++++++ .../expected.json | 18 ++++++++++++++++++ .../input.json | 9 +++++++++ .../test.fix | 1 + .../test.flux | 8 ++++++++ .../disabled.txt | 2 +- .../expected.json | 13 +++++++++++++ .../input.json | 13 +++++++++++++ .../test.fix | 1 + .../test.flux | 8 ++++++++ .../toJson/copy_fieldSimple/expected.json | 4 ++++ .../toJson/copy_fieldSimple/input.json | 3 +++ .../fromJson/toJson/copy_fieldSimple/test.fix | 1 + .../fromJson/toJson/copy_fieldSimple/test.flux | 8 ++++++++ .../test.fix | 1 - 71 files changed, 398 insertions(+), 3 deletions(-) create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/test.fix rename metafix/src/test/resources/org/metafacture/metafix/integration/{record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk => method/fromJson/toJson/join_fieldSimpleAndChangeToArray}/test.flux (100%) create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.flux rename metafix/src/test/resources/org/metafacture/metafix/integration/{record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk => method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk}/expected.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/{record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk => method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk}/input.json (100%) create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/test.flux delete mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/expected.json new file mode 100644 index 00000000..00f64362 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/expected.json @@ -0,0 +1,3 @@ +{ + "investigators" : "Justus?Peter?Bob" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/input.json new file mode 100644 index 00000000..6004ff7c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/input.json @@ -0,0 +1,3 @@ +{ + "investigators" : [ "Justus", "Peter", "Bob" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/test.fix new file mode 100644 index 00000000..fdaf9966 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/test.fix @@ -0,0 +1,2 @@ +join_field("investigators[]","?") +move_field("investigators[]","investigators") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/test.flux similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.flux rename to metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/join_fieldSimpleAndChangeToArray/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/expected.json new file mode 100644 index 00000000..53adebb3 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/expected.json @@ -0,0 +1,18 @@ +{ + "object" : { + "__key" : "word", + "key" : "word", + "key_2" : "word_2", + "__bject" : { + "key_3" : "word_3", + "array##fStrings" : [ "test", "test_2", "test_3" ] + }, + "array##f##bjects" : [ { + "key_4" : "word_4", + "array##fStrings_2" : [ "test", "test_2", "test_3" ] + }, { + "__key_2" : "word_2", + "array##fStrings" : [ "test", "test_2", "test_3" ] + } ] + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/input.json new file mode 100644 index 00000000..7cdc3b5e --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/input.json @@ -0,0 +1,18 @@ +{ + "object" : { + "okey" : "word", + "key" : "word", + "key_2" : "word_2", + "object" : { + "key_3" : "word_3", + "arrayOfStrings" : [ "test", "test_2", "test_3" ] + }, + "arrayOfObjects" : [ { + "key_4" : "word_4", + "arrayOfStrings_2" : [ "test", "test_2", "test_3" ] + }, { + "okey_2" : "word_2", + "arrayOfStrings" : [ "test", "test_2", "test_3" ] + } ] + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.fix new file mode 100644 index 00000000..62ed97bc --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.fix @@ -0,0 +1,2 @@ +rename("object", "o", "__") +rename("object", "O", "##") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/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/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/expected.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/expected.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/input.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/input.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/test.fix new file mode 100644 index 00000000..1643a90a --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/test.fix @@ -0,0 +1 @@ +replace_all("key[].*", "o", "__") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInArrayOfStringsWithAsterisk/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/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/expected.json new file mode 100644 index 00000000..4c888af3 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/expected.json @@ -0,0 +1,12 @@ +{ + "key" : [ { + "foo" : "bar", + "word" : "value" + }, { + "foo" : "bar", + "word" : "m__re_value" + }, { + "foo" : "bar", + "word" : "even_m__re_value" + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/input.json new file mode 100644 index 00000000..aeba8bf7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/input.json @@ -0,0 +1,12 @@ +{ + "key" : [ { + "word" : "value", + "foo" : "bar" + }, { + "word" : "more_value", + "foo" : "bar" + }, { + "word" : "even_more_value", + "foo" : "bar" + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/test.fix new file mode 100644 index 00000000..4e8f6c17 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/test.fix @@ -0,0 +1 @@ +replace_all("key[].*.word", "o", "__") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk/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/method/fromJson/toJson/replace_allSimple/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/expected.json new file mode 100644 index 00000000..ca88cd1c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/expected.json @@ -0,0 +1,3 @@ +{ + "key" : "b__ard" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/input.json new file mode 100644 index 00000000..cae33cb0 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/input.json @@ -0,0 +1,3 @@ +{ + "key" : "board" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/test.fix new file mode 100644 index 00000000..1c2c099e --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/test.fix @@ -0,0 +1 @@ +replace_all("key", "o", "__") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allSimple/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/method/fromJson/toJson/reverseArrayOfStrings/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/disabled.txt new file mode 100644 index 00000000..0b9661d2 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/disabled.txt @@ -0,0 +1 @@ +See issue #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/expected.json new file mode 100644 index 00000000..516ffb50 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/expected.json @@ -0,0 +1,3 @@ +{ + "animals" : [ "zebra", "cat", "dog" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/input.json new file mode 100644 index 00000000..12733202 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/input.json @@ -0,0 +1,3 @@ +{ + "animals" : [ "dog", "cat", "zebra" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/test.fix new file mode 100644 index 00000000..1b418b26 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/test.fix @@ -0,0 +1 @@ +reverse("animals[]") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseArrayOfStrings/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/method/fromJson/toJson/reverseSimpleField/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/expected.json new file mode 100644 index 00000000..2749dc0a --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/expected.json @@ -0,0 +1,7 @@ +{ + "animal" : "ynnub", + "animal_2" : { + "name" : "bird", + "type" : "TSET" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/input.json new file mode 100644 index 00000000..0c72e14b --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/input.json @@ -0,0 +1,7 @@ +{ + "animal": "bunny", + "animal_2": { + "name": "bird", + "type": "TEST" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix new file mode 100644 index 00000000..e3ab033e --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix @@ -0,0 +1,2 @@ +reverse("animal") +reverse("animal_2.test") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/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/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/disabled.txt new file mode 100644 index 00000000..0b9661d2 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/disabled.txt @@ -0,0 +1 @@ +See issue #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/expected.json new file mode 100644 index 00000000..4075c2a5 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/expected.json @@ -0,0 +1,12 @@ +{ + "test": [{ + "key": "1_eulav", + "test": "test_1" + },{ + "key": "2_eulav", + "test": "test_2" + },{ + "key": "3_eulav", + "test": "test_3" + }] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/input.json new file mode 100644 index 00000000..84d0da50 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/input.json @@ -0,0 +1,12 @@ +{ + "test": [{ + "key": "value_1", + "test": "test_1" + },{ + "key": "value_2", + "test": "test_2" + },{ + "key": "value_3", + "test": "test_3" + }] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/test.fix new file mode 100644 index 00000000..f3bfc0bb --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/test.fix @@ -0,0 +1 @@ +reverse("test[].*.key") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSubfieldInArrayOfObjects/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/method/fromJson/toJson/reverseValuesInArrayOfStrings/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/disabled.txt new file mode 100644 index 00000000..0b9661d2 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/disabled.txt @@ -0,0 +1 @@ +See issue #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/expected.json new file mode 100644 index 00000000..9e7b8148 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/expected.json @@ -0,0 +1,3 @@ +{ + "animals" : [ "god", "tac", "arbez" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/input.json new file mode 100644 index 00000000..0218f89c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/input.json @@ -0,0 +1,3 @@ +{ + "animals": [ "dog", "cat", "zebra" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/test.fix new file mode 100644 index 00000000..5c655bc7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/test.fix @@ -0,0 +1 @@ +reverse("animals[].*") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseValuesInArrayOfStrings/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/method/fromJson/toJson/split_fieldSimple/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/expected.json new file mode 100644 index 00000000..4efa30ad --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/expected.json @@ -0,0 +1,5 @@ +{ + "tools" : "magic", + "tools" : "arms", + "tools" : "shapeShifting" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/input.json new file mode 100644 index 00000000..3ef275ad --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/input.json @@ -0,0 +1,3 @@ +{ + "tools" : "magic--arms--shapeShifting" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/test.fix new file mode 100644 index 00000000..d443afdf --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/test.fix @@ -0,0 +1 @@ +split_field("tools", "--") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSimple/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/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/disabled.txt new file mode 100644 index 00000000..0b9661d2 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/disabled.txt @@ -0,0 +1 @@ +See issue #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/expected.json new file mode 100644 index 00000000..60629f1d --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/expected.json @@ -0,0 +1,15 @@ +{ + "adventureDuo" : [ { + "name" : "Jake", + "animal" : "dog", + "tools" : "magic", + "tools" : "arms", + "tools" : "shapeShifting" + }, { + "name" : "Finn", + "animal" : "human", + "tools" : "sword", + "tools" : "anotherSword", + "tools" : "arm" + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json new file mode 100644 index 00000000..b29cc094 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json @@ -0,0 +1,11 @@ +{ + "adventureDuo": [ { + "name" : "Jake", + "animal" : "dog", + "tools" : "magic--arms--shapeShifting" + }, { + "name" : "Finn", + "animal" : "human", + "tools" : "sword--anotherSword--arm" + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/test.fix new file mode 100644 index 00000000..d50fde61 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/test.fix @@ -0,0 +1 @@ +split_field("adventureDuo[].*.tools", "--") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/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/method/fromJson/toJson/split_fieldSubfieldInObject/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/expected.json new file mode 100644 index 00000000..0a69d6b7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/expected.json @@ -0,0 +1,7 @@ +{ + "people" : { + "investigators" : "Justus", + "investigators" : "Peter", + "investigators" : "Bob" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/input.json new file mode 100644 index 00000000..00b7a05a --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/input.json @@ -0,0 +1,5 @@ +{ + "people" : { + "investigators" : "Justus?Peter?Bob" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/test.fix new file mode 100644 index 00000000..9775183c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/test.fix @@ -0,0 +1 @@ +split_field("people.investigators","\\?") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInObject/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/record/fromJson/toJson/add_fieldAsteriskIntoArrayOfObjects/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/add_fieldAsteriskIntoArrayOfObjects/disabled.txt index 5d692bde..26adbe67 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/add_fieldAsteriskIntoArrayOfObjects/disabled.txt +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/add_fieldAsteriskIntoArrayOfObjects/disabled.txt @@ -1 +1 @@ -See issue #156 +See issue #156 and #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/expected.json new file mode 100644 index 00000000..0d343c0e --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/expected.json @@ -0,0 +1,16 @@ +{ + "test" : [ { + "key" : "value_1" + }, { + "key" : "value_2" + }, { + "key" : "value_3" + } ], + "test_2" : [ { + "key" : "value_1" + }, { + "key" : "value_2" + }, { + "key" : "value_3" + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/input.json new file mode 100644 index 00000000..d4e78667 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/input.json @@ -0,0 +1,9 @@ +{ + "test": [{ + "key": "value_1" + },{ + "key": "value_2" + },{ + "key": "value_3" + }] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.fix new file mode 100644 index 00000000..ca2fbaf9 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.fix @@ -0,0 +1 @@ +copy_field("test[]", "test_2[]") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/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/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/expected.json new file mode 100644 index 00000000..c5eb79b8 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/expected.json @@ -0,0 +1,18 @@ +{ + "test" : [ { + "key" : "value_1" + }, { + "key" : "value_2" + }, { + "key" : "value_3" + } ], + "repeatedTest" : { + "key" : "value_1" + }, + "repeatedTest" : { + "key" : "value_2" + }, + "repeatedTest" : { + "key" : "value_3" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/input.json new file mode 100644 index 00000000..d4e78667 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/input.json @@ -0,0 +1,9 @@ +{ + "test": [{ + "key": "value_1" + },{ + "key": "value_2" + },{ + "key": "value_3" + }] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.fix new file mode 100644 index 00000000..148fd867 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.fix @@ -0,0 +1 @@ +copy_field("test[]", "repeatedTest") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/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/record/fromJson/toJson/copy_fieldFromArrayOfStringsInArrayOfObjectsWithAsterisk/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromArrayOfStringsInArrayOfObjectsWithAsterisk/disabled.txt index 50dfbeee..4c62acfe 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromArrayOfStringsInArrayOfObjectsWithAsterisk/disabled.txt +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromArrayOfStringsInArrayOfObjectsWithAsterisk/disabled.txt @@ -1 +1 @@ -See issue #155 +See issue #155 also #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/expected.json new file mode 100644 index 00000000..160e7e5c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/expected.json @@ -0,0 +1,13 @@ +{ + "key" : [ { + "word" : "value", + "foo" : "bar" + }, { + "word" : "more_value", + "foo" : "bar" + }, { + "word" : "even_more_value", + "foo" : "bar" + } ], + "words" : [ "value", "more_value", "even_more_value" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/input.json new file mode 100644 index 00000000..0ad1ca49 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/input.json @@ -0,0 +1,13 @@ +{ + "key" : [ { + "word" : "value", + "foo" : "bar" + }, { + "word" : "more_value", + "foo" : "bar" + }, { + "word" : "even_more_value", + "foo" : "bar" + } ], + "words" : [ ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/test.fix new file mode 100644 index 00000000..772651d3 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/test.fix @@ -0,0 +1 @@ +copy_field("key[].*.word", "words[].$append") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldFromSubfieldInArrayOfObjectsWithAsterisk/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/record/fromJson/toJson/copy_fieldSimple/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/expected.json new file mode 100644 index 00000000..a6f359df --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/expected.json @@ -0,0 +1,4 @@ +{ + "animal" : "bunny", + "type" : "bunny" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/input.json new file mode 100644 index 00000000..b3abb029 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/input.json @@ -0,0 +1,3 @@ +{ + "animal": "bunny" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/test.fix new file mode 100644 index 00000000..4d7b68fb --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/test.fix @@ -0,0 +1 @@ +copy_field("animal", "type") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldSimple/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/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix deleted file mode 100644 index 0f50b7d8..00000000 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix +++ /dev/null @@ -1 +0,0 @@ -replace_all("test[].*", "o", "__") From 45fb04d849f4a06f03acfaed5bd6a92f72f26c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 2 Mar 2022 11:38:18 +0100 Subject: [PATCH 3/5] Add more integration tests for #121 and for the functions that are discussed in #121 --- .../disabled.txt | 1 + .../expected.json | 11 +++++++++++ .../input.json | 11 +++++++++++ .../test.fix | 2 ++ .../test.flux | 8 ++++++++ .../toJson/sort_fieldSimple/expected.json | 9 +++++++++ .../fromJson/toJson/sort_fieldSimple/input.json | 9 +++++++++ .../fromJson/toJson/sort_fieldSimple/test.fix | 7 +++++++ .../fromJson/toJson/sort_fieldSimple/test.flux | 8 ++++++++ .../input.json | 16 ++++++++-------- .../fromJson/toJson/sumSimple/expected.json | 4 ++++ .../method/fromJson/toJson/sumSimple/input.json | 4 ++++ .../method/fromJson/toJson/sumSimple/test.fix | 3 +++ .../method/fromJson/toJson/sumSimple/test.flux | 8 ++++++++ .../sumSubfieldInArrayOfObjects/disabled.txt | 1 + .../sumSubfieldInArrayOfObjects/expected.json | 7 +++++++ .../sumSubfieldInArrayOfObjects/input.json | 7 +++++++ .../toJson/sumSubfieldInArrayOfObjects/test.fix | 2 ++ .../toJson/sumSubfieldInArrayOfObjects/test.flux | 8 ++++++++ 19 files changed, 118 insertions(+), 8 deletions(-) create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/test.flux create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/disabled.txt new file mode 100644 index 00000000..0b9661d2 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/disabled.txt @@ -0,0 +1 @@ +See issue #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/expected.json new file mode 100644 index 00000000..78d32c1f --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/expected.json @@ -0,0 +1,11 @@ +{ + "adventureDuo": [ { + "name" : "Jake", + "animal" : "dog", + "tools" : [ "arms", "magic", "shapeShifting" ] + }, { + "name" : "Finn", + "animal" : "human", + "tools" : [ "anotherSword", "arm", "sword" ] + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/input.json new file mode 100644 index 00000000..9ae00b1c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/input.json @@ -0,0 +1,11 @@ +{ + "adventureDuo": [ { + "name" : "Jake", + "animal" : "dog", + "tools" : [ "magic", "arms", "shapeShifting" ] + }, { + "name" : "Finn", + "animal" : "human", + "tools" : [ "sword", "anotherSword", "arm" ] + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/test.fix new file mode 100644 index 00000000..a18704c6 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/test.fix @@ -0,0 +1,2 @@ +sort_field("adventureDuo[].*.tools[]") + diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldInArrayOfObjectsWithAsterisk/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/method/fromJson/toJson/sort_fieldSimple/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/expected.json new file mode 100644 index 00000000..0b6279cc --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/expected.json @@ -0,0 +1,9 @@ +{ + "animals" : [ "cat", "cat", "dog", "zebra" ], + "animals_2" : [ "zebra", "dog", "cat", "cat" ], + "animals_3" : [ "cat", "dog", "zebra" ], + "numbers" : [ "1", "10", "2", "7", "7" ], + "numbers_2" : [ "1", "2", "7", "7", "10" ], + "numbers_3" : [ "10", "7", "7", "2", "1" ], + "numbers_4" : [ "1", "2", "7", "10" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/input.json new file mode 100644 index 00000000..4d31b867 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/input.json @@ -0,0 +1,9 @@ +{ + "animals" : [ "dog", "cat", "cat", "zebra" ], + "animals_2" : [ "dog", "cat", "cat", "zebra" ], + "animals_3" : [ "dog", "cat", "cat", "zebra" ], + "numbers" : [ "7", "2", "7", "1", "10" ], + "numbers_2" : [ "7", "2", "7", "1", "10" ], + "numbers_3" : [ "7", "2", "7", "1", "10" ], + "numbers_4" : [ "7", "2", "7", "1", "10" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/test.fix new file mode 100644 index 00000000..1ae49f39 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/test.fix @@ -0,0 +1,7 @@ +sort_field("animals[]") +sort_field("numbers[]") +sort_field("numbers_2[]",numeric:"true") +sort_field("animals_2[]",reverse:"true") +sort_field("numbers_3[]", numeric:"true",reverse:"true") +sort_field("animals_3[]", uniq:"true") +sort_field("numbers_4[]",numeric:"true", uniq:"true") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sort_fieldSimple/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/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json index b29cc094..1e14a838 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/split_fieldSubfieldInArrayOfObjectsWithAsterisk/input.json @@ -1,11 +1,11 @@ { "adventureDuo": [ { - "name" : "Jake", - "animal" : "dog", - "tools" : "magic--arms--shapeShifting" - }, { - "name" : "Finn", - "animal" : "human", - "tools" : "sword--anotherSword--arm" - } ] + "name" : "Jake", + "animal" : "dog", + "tools" : "magic--arms--shapeShifting" + }, { + "name" : "Finn", + "animal" : "human", + "tools" : "sword--anotherSword--arm" + } ] } diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/expected.json new file mode 100644 index 00000000..ce6d5321 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/expected.json @@ -0,0 +1,4 @@ +{ + "numbers" : [ "27" ], + "numbers_2" : [ "10" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/input.json new file mode 100644 index 00000000..3abb6ce3 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/input.json @@ -0,0 +1,4 @@ +{ + "numbers" : [ "7", "2", "7", "1", "10" ], + "numbers_2" : [ "1", "2", "3", "4"] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/test.fix new file mode 100644 index 00000000..b3ff41e5 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/test.fix @@ -0,0 +1,3 @@ +sum("numbers[]") +sum("numbers_2[]") + diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSimple/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/method/fromJson/toJson/sumSubfieldInArrayOfObjects/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/disabled.txt new file mode 100644 index 00000000..0b9661d2 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/disabled.txt @@ -0,0 +1 @@ +See issue #121 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/expected.json new file mode 100644 index 00000000..c5284171 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/expected.json @@ -0,0 +1,7 @@ +{ + "objects" : [ { + "numbers" : [ "27" ] + }, { + "numbers" : [ "10"] + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json new file mode 100644 index 00000000..63a3d84e --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json @@ -0,0 +1,7 @@ +{ + "objects" : [ { + "numbers" : [ "7", "2", "7", "1", "10" ] + }, { + "numbers_2" : [ "1", "2", "3", "4"] + } ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/test.fix new file mode 100644 index 00000000..f134b293 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/test.fix @@ -0,0 +1,2 @@ +sum("objects[].*.numbers[]") + diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/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") +; From 4419fb17eff564bc09096a413fa66d77fd3d37e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 2 Mar 2022 11:59:51 +0100 Subject: [PATCH 4/5] Fix error in test --- .../method/fromJson/toJson/reverseSimpleField/test.fix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix index e3ab033e..a5282254 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/reverseSimpleField/test.fix @@ -1,2 +1,2 @@ reverse("animal") -reverse("animal_2.test") +reverse("animal_2.type") From a6a466349c92d00adf9da7f259727a545e721c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 2 Mar 2022 13:10:57 +0100 Subject: [PATCH 5/5] Add requested changes #184 --- .../fromJson/toJson/sumSubfieldInArrayOfObjects/input.json | 2 +- .../expected.json | 0 .../input.json | 0 .../test.fix | 0 .../fromJson/toJson/copy_fieldArrayOfObjects}/test.flux | 0 .../expected.json | 0 .../input.json | 0 .../test.fix | 0 .../test.flux | 0 .../disabled.txt | 0 .../expected.json | 0 .../input.json | 0 .../test.fix | 0 .../test.flux | 0 .../fromJson/toJson/renameInObject/expected.json | 0 .../fromJson/toJson/renameInObject/input.json | 0 .../{method => record}/fromJson/toJson/renameInObject/test.fix | 0 .../test.flux | 0 18 files changed, 1 insertion(+), 1 deletion(-) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObject => copy_fieldArrayOfObjects}/expected.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObject => copy_fieldArrayOfObjects}/input.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObject => copy_fieldArrayOfObjects}/test.fix (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/{method/fromJson/toJson/renameInObject => record/fromJson/toJson/copy_fieldArrayOfObjects}/test.flux (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObject => copy_fieldArrayOfObjectsAsRepeatedObject}/expected.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObject => copy_fieldArrayOfObjectsAsRepeatedObject}/input.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObject => copy_fieldArrayOfObjectsAsRepeatedObject}/test.fix (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObject => copy_fieldArrayOfObjectsAsRepeatedObject}/test.flux (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard => copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard}/disabled.txt (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard => copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard}/expected.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard => copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard}/input.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard => copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard}/test.fix (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObject => copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard}/test.flux (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/{method => record}/fromJson/toJson/renameInObject/expected.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/{method => record}/fromJson/toJson/renameInObject/input.json (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/{method => record}/fromJson/toJson/renameInObject/test.fix (100%) rename metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/{copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard => renameInObject}/test.flux (100%) diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json index 63a3d84e..c31cf0b1 100644 --- a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/sumSubfieldInArrayOfObjects/input.json @@ -2,6 +2,6 @@ "objects" : [ { "numbers" : [ "7", "2", "7", "1", "10" ] }, { - "numbers_2" : [ "1", "2", "3", "4"] + "numbers" : [ "1", "2", "3", "4"] } ] } diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/expected.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/expected.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/expected.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/input.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/input.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/input.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/test.fix similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.fix rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/test.fix diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/test.flux similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.flux rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjects/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/expected.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/expected.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/expected.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/input.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/input.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/input.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/test.fix similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.fix rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/test.fix diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/test.flux similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObject/test.flux rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObject/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/disabled.txt similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/disabled.txt rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/disabled.txt diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/expected.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/expected.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/expected.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/input.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/input.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/input.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.fix similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.fix rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.fix diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.flux similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObject/test.flux rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectsAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/expected.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/expected.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/expected.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/input.json similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/input.json rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/input.json diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/test.fix similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/renameInObject/test.fix rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/test.fix diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/test.flux similarity index 100% rename from metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfObjectAsRepeatedObjectAndThenArrayOfStringsIntoTheArrayOfObjectsWithLastWildcard/test.flux rename to metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/renameInObject/test.flux