File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
metafacture-xml/src/test/java/org/metafacture/xml Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1919import static org .junit .Assert .assertEquals ;
2020import static org .junit .Assert .assertTrue ;
2121
22+ import org .metafacture .framework .helpers .DefaultObjectReceiver ;
23+ import org .metafacture .framework .helpers .DefaultXmlPipe ;
24+
2225import java .util .HashMap ;
2326import java .util .Map ;
2427
2528import org .junit .Before ;
2629import org .junit .Test ;
27- import org .metafacture .framework .helpers .DefaultObjectReceiver ;
2830
2931/**
3032 * Tests for class {@link SimpleXmlEncoder}.
@@ -251,6 +253,22 @@ public void issue379_testShouldEncodeConfiguredValueLiteralsAsText() {
251253 getResultXml ());
252254 }
253255
256+ @ Test
257+ public void issue379_testShouldNotEncodeUnconfiguredValueLiteralsAsText () {
258+ simpleXmlEncoder .startRecord ("" );
259+ simpleXmlEncoder .literal (DefaultXmlPipe .DEFAULT_VALUE_TAG , VALUE );
260+ simpleXmlEncoder .endRecord ();
261+ simpleXmlEncoder .closeStream ();
262+
263+ assertEquals ("<?xml version=\" 1.0\" encoding=\" UTF-8\" ?>" +
264+ "<records>" +
265+ "<record>" +
266+ "<value>value</value>" +
267+ "</record>" +
268+ "</records>" ,
269+ getResultXml ());
270+ }
271+
254272 @ Test
255273 public void testShouldEncodeMarkedLiteralsAsAttributes () {
256274 simpleXmlEncoder .startRecord ("" );
You can’t perform that action at this time.
0 commit comments