Skip to content

Commit

Permalink
Fix test for #403, move to non-failing
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jun 5, 2020
1 parent 2226bd7 commit 1bebf0b
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.deser;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;

public class JsonNodeMixedContent402Test extends XmlTestBase
public class JsonNodeMixedContent403Test extends XmlTestBase
{
final private ObjectMapper XML_MAPPER = newMapper();

Expand All @@ -13,28 +13,29 @@ public class JsonNodeMixedContent402Test extends XmlTestBase
public void testMixedContentBefore() throws Exception
{
// First, before elements:
assertEquals(JSON_MAPPER.readTree(a2q("{'':'before','a':1,'b':'2'}")),
assertEquals(JSON_MAPPER.readTree(a2q("{'':'before','a':'1','b':'2'}")),
XML_MAPPER.readTree("<root>before<a>1</a><b>2</b></root>"));
}

public void testMixedContentBetween() throws Exception
{
// Second, between
assertEquals(JSON_MAPPER.readTree(a2q("{'a':1,'':'between','b':'2'}")),
assertEquals(JSON_MAPPER.readTree(a2q("{'a':'1','':'between','b':'2'}")),
XML_MAPPER.readTree("<root><a>1</a>between<b>2</b></root>"));
}

public void testMixedContentAfter() throws Exception
{
// and then after
assertEquals(JSON_MAPPER.readTree(a2q("{'a':1,'b':'2','':'after'}")),
assertEquals(JSON_MAPPER.readTree(a2q("{'a':'1','b':'2','':'after'}")),
XML_MAPPER.readTree("<root><a>1</a><b>2</b>after</root>"));
}

public void testMultipleMixedContent() throws Exception
{
// and then after
assertEquals(JSON_MAPPER.readTree(a2q("{'':['first','second','third'],'a':1,'b':'2','':'after'}")),
XML_MAPPER.readTree("<root>first<a>1</a>second<b>2</b>this</root>"));
assertEquals(JSON_MAPPER.readTree(
a2q("{'':['first','second','third'],'a':'1','b':'2'}")),
XML_MAPPER.readTree("<root>first<a>1</a>second<b>2</b>third</root>"));
}
}

0 comments on commit 1bebf0b

Please sign in to comment.