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:
joewitt 2016-01-24 22:05:34 -05:00 committed by Mark Payne
parent 4a5fb37b33
commit beb92492be
5 changed files with 10 additions and 1 deletions

View File

@ -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.flowfilev3</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.gz</exclude>
<exclude>src/test/resources/CompressedData/SampleFile1.txt.bz2</exclude>

View File

@ -318,7 +318,7 @@ public class SplitXml extends AbstractProcessor {
sb.append(entry.getKey());
sb.append("=\"");
sb.append(entry.getValue());
sb.append("\" ");
sb.append("\"");
}
}

View File

@ -109,6 +109,11 @@ public class TestSplitXml {
parseFlowFiles(runner.getFlowFilesForRelationship(SplitXml.REL_ORIGINAL));
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 {

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><value xmlns:foo="http://namespace/1">Hello &amp; Goodbye</value>

View File

@ -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>