From 679c7937932680fcb7de57f906bebe25a317b337 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Sun, 28 May 2023 15:46:07 -0700 Subject: [PATCH] Minor test addition --- .../dataformat/xml/FeatureDefaultsTest.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/test/java/com/fasterxml/jackson/dataformat/xml/FeatureDefaultsTest.java diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/FeatureDefaultsTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/FeatureDefaultsTest.java new file mode 100644 index 000000000..1673fc50a --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/FeatureDefaultsTest.java @@ -0,0 +1,22 @@ +package com.fasterxml.jackson.dataformat.xml; + +import com.fasterxml.jackson.databind.ObjectReader; +import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser; +import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; + +public class FeatureDefaultsTest extends XmlTestBase +{ + private final XmlMapper MAPPER = newMapper(); + + public void testDeserDefaults() throws Exception + { + ObjectReader r = MAPPER.reader(); + assertNotSame(r, r.with(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL)); + } + + public void testSerDefaults() throws Exception + { + ObjectReader r = MAPPER.reader(); + assertNotSame(r, r.with(ToXmlGenerator.Feature.WRITE_XML_1_1)); + } +}