From 3d34a2eb88681bf276140662e2ce4c6259a1f2e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Mon, 28 Feb 2022 17:11:00 +0100 Subject: [PATCH] Rename folder for integration test of #145 --- .../toJson/retainCertainSubfields/disabled.txt | 1 + .../toJson/retainCertainSubfields/expected.json | 11 +++++++++++ .../toJson/retainCertainSubfields/input.json | 17 +++++++++++++++++ .../toJson/retainCertainSubfields/test.fix | 1 + .../toJson/retainCertainSubfields/test.flux | 8 ++++++++ 5 files changed, 38 insertions(+) create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/disabled.txt create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/expected.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/input.json create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/test.fix create mode 100644 metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/test.flux diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/disabled.txt new file mode 100644 index 00000000..d8aeb165 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/disabled.txt @@ -0,0 +1 @@ +See issue #145 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/expected.json new file mode 100644 index 00000000..b229275f --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/expected.json @@ -0,0 +1,11 @@ +{ + "test" : [ { + "foo" : "bar" + }, { + "foo" : "bar" + } ], + "words" : [ "bla", "bla", "bla" ], + "test_2" : { + "test": "test" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/input.json new file mode 100644 index 00000000..19cc05f9 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/input.json @@ -0,0 +1,17 @@ +{ + "test" : [ { + "key" : [ "value", "more_value", "even_more_value" ], + "foo" : "bar", + "test": "test" + }, { + "key" : [ "less_value", "little_value", "no_value" ], + "foo" : "bar", + "test": "test" + } ], + "words" : [ "bla", "bla", "bla" ], + "test_2" : { + "key" : [ "value", "more_value", "even_more_value" ], + "foo" : "bar", + "test": "test" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/test.fix new file mode 100644 index 00000000..f6b5007f --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/test.fix @@ -0,0 +1 @@ +retain("words[]", "test[].*.foo", "test_2.test") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/retainCertainSubfields/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") +;