From 43f36edb3dd980b578518df7fd441ec32ea7c26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Mon, 28 Feb 2022 14:40:11 +0100 Subject: [PATCH] Add integration test for #104 #160 --- .../toJson/move_fieldIntoOwnSubfield/disabled.txt | 1 + .../toJson/move_fieldIntoOwnSubfield/expected.json | 5 +++++ .../fromJson/toJson/move_fieldIntoOwnSubfield/input.json | 3 +++ .../fromJson/toJson/move_fieldIntoOwnSubfield/test.fix | 1 + .../fromJson/toJson/move_fieldIntoOwnSubfield/test.flux | 8 ++++++++ 5 files changed, 18 insertions(+) create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/disabled.txt new file mode 100644 index 00000000..d1cb719f --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/disabled.txt @@ -0,0 +1 @@ +See #104 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/expected.json new file mode 100644 index 00000000..b05ccff1 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/expected.json @@ -0,0 +1,5 @@ +{ + "animal" : { + "type" : "bunny" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/input.json new file mode 100644 index 00000000..b3abb029 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/input.json @@ -0,0 +1,3 @@ +{ + "animal": "bunny" +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/test.fix new file mode 100644 index 00000000..6fe070f4 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/test.fix @@ -0,0 +1 @@ +move_field("animal", "animal.type") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldIntoOwnSubfield/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") +;