Skip to content

Commit 9a642cb

Browse files
committed
Merge branch '2.18' into 2.19
2 parents 8565a7c + a27fc5a commit 9a642cb

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.fasterxml.jackson.dataformat.xml.records.failing;
2+
3+
import org.junit.Test;
4+
5+
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
6+
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
7+
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
8+
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
9+
10+
import static org.junit.Assert.assertEquals;
11+
12+
// [dataformat-xml#734]
13+
public class XmlRecordDeser734Test extends XmlTestBase
14+
{
15+
16+
record Amount(@JacksonXmlText String value,
17+
@JacksonXmlProperty(isAttribute = true, localName = "Ccy") String currency) {}
18+
19+
private final String XML =
20+
a2q("<Amt Ccy='EUR'>1</Amt>");
21+
22+
//@JacksonTestFailureExpected
23+
@Test
24+
public void testDeser() throws Exception {
25+
XmlMapper mapper = new XmlMapper();
26+
Amount amt = mapper.readValue(XML, Amount.class);
27+
assertEquals("1", amt.value);
28+
assertEquals("EUR", amt.currency);
29+
}
30+
}

0 commit comments

Comments
 (0)