You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by pvillard31 <gi...@git.apache.org> on 2018/11/01 12:43:17 UTC

[GitHub] nifi pull request #3098: NIFI-5728 XML Writer to populate record tag name pr...

Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3098#discussion_r230024436
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestXMLRecordSetWriter.java ---
    @@ -116,6 +124,34 @@ public void testRootAndRecordNaming() throws IOException, InitializationExceptio
             assertThat(expected, CompareMatcher.isSimilarTo(actual).ignoreWhitespace().withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndText)));
         }
     
    +    @Test
    +    public void testSchemaRootRecordNaming() throws IOException, InitializationException {
    +        String avroSchemaText = new String(Files.readAllBytes(Paths.get("src/test/resources/xml/testschema3")));;
    +        Schema avroSchema = new Schema.Parser().parse(avroSchemaText);
    +
    +        SchemaIdentifier schemaId = SchemaIdentifier.builder().name("schemaName").build();
    +        RecordSchema recordSchema = AvroTypeUtil.createSchema(avroSchema, avroSchemaText, schemaId);
    +
    +        XMLRecordSetWriter writer = new _XMLRecordSetWriter(recordSchema);
    +        TestRunner runner = setup(writer);
    +
    +        runner.setProperty(writer, XMLRecordSetWriter.ROOT_TAG_NAME, "ROOT_NODE");
    +        //runner.setProperty(writer, XMLRecordSetWriter.RECORD_TAG_NAME, "RECORD_NODE");
    --- End diff --
    
    to remove?


---