mirror of https://github.com/apache/nifi.git
NIFI-1421 This closes #184. Added content assertion to test and removed extra space
Signed-off-by: Mark Payne <markap14@hotmail.com>
This commit is contained in:
parent
4a5fb37b33
commit
beb92492be
|
@ -293,6 +293,8 @@ language governing permissions and limitations under the License. -->
|
||||||
<exclude>src/test/resources/TestUnpackContent/data.flowfilev2</exclude>
|
<exclude>src/test/resources/TestUnpackContent/data.flowfilev2</exclude>
|
||||||
<exclude>src/test/resources/TestUnpackContent/data.flowfilev3</exclude>
|
<exclude>src/test/resources/TestUnpackContent/data.flowfilev3</exclude>
|
||||||
<exclude>src/test/resources/TestXml/xml-bundle-1</exclude>
|
<exclude>src/test/resources/TestXml/xml-bundle-1</exclude>
|
||||||
|
<exclude>src/test/resources/TestXml/namespaceSplit1.xml</exclude>
|
||||||
|
<exclude>src/test/resources/TestXml/namespaceSplit2.xml</exclude>
|
||||||
<exclude>src/test/resources/CompressedData/SampleFile.txt.bz2</exclude>
|
<exclude>src/test/resources/CompressedData/SampleFile.txt.bz2</exclude>
|
||||||
<exclude>src/test/resources/CompressedData/SampleFile.txt.gz</exclude>
|
<exclude>src/test/resources/CompressedData/SampleFile.txt.gz</exclude>
|
||||||
<exclude>src/test/resources/CompressedData/SampleFile1.txt.bz2</exclude>
|
<exclude>src/test/resources/CompressedData/SampleFile1.txt.bz2</exclude>
|
||||||
|
|
|
@ -318,7 +318,7 @@ public class SplitXml extends AbstractProcessor {
|
||||||
sb.append(entry.getKey());
|
sb.append(entry.getKey());
|
||||||
sb.append("=\"");
|
sb.append("=\"");
|
||||||
sb.append(entry.getValue());
|
sb.append(entry.getValue());
|
||||||
sb.append("\" ");
|
sb.append("\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,11 @@ public class TestSplitXml {
|
||||||
|
|
||||||
parseFlowFiles(runner.getFlowFilesForRelationship(SplitXml.REL_ORIGINAL));
|
parseFlowFiles(runner.getFlowFilesForRelationship(SplitXml.REL_ORIGINAL));
|
||||||
parseFlowFiles(runner.getFlowFilesForRelationship(SplitXml.REL_SPLIT));
|
parseFlowFiles(runner.getFlowFilesForRelationship(SplitXml.REL_SPLIT));
|
||||||
|
|
||||||
|
final MockFlowFile split1 = runner.getFlowFilesForRelationship(SplitXml.REL_SPLIT).get(0);
|
||||||
|
split1.assertContentEquals(Paths.get("src/test/resources/TestXml/namespaceSplit1.xml"));
|
||||||
|
final MockFlowFile split2 = runner.getFlowFilesForRelationship(SplitXml.REL_SPLIT).get(1);
|
||||||
|
split2.assertContentEquals(Paths.get("src/test/resources/TestXml/namespaceSplit2.xml"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parseFlowFiles(List<MockFlowFile> flowfiles) throws Exception, SAXException {
|
public void parseFlowFiles(List<MockFlowFile> flowfiles) throws Exception, SAXException {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?><value xmlns:foo="http://namespace/1">Hello & Goodbye</value>
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?><goo:value xmlns:foo="http://namespace/1" xmlns:goo="http://namespace/2">World</goo:value>
|
Loading…
Reference in New Issue