File tree Expand file tree Collapse file tree
test-jdk17/java/com/fasterxml/jackson/dataformat/xml
test/java/com/fasterxml/jackson/dataformat/xml Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import java .util .stream .Collectors ;
77import java .util .stream .Stream ;
88
9- import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
10- import com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
9+ import com .fasterxml .jackson .dataformat .xml .*;
1110
12- public class Java17CollectionsTest extends XmlTestBase
11+ import static org .junit .jupiter .api .Assertions .assertEquals ;
12+
13+ public class Java17CollectionsTest extends XmlTestUtil
1314{
1415 private final XmlMapper _xmlMapper = new XmlMapper ();
1516
Original file line number Diff line number Diff line change 11package com .fasterxml .jackson .dataformat .xml .records .failing ;
22
3- import org .junit .Test ;
3+ import org .junit .jupiter . api . Test ;
44
5- import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
6- import com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
5+ import com .fasterxml .jackson .dataformat .xml .*;
76import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlProperty ;
87import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlText ;
8+ import com .fasterxml .jackson .dataformat .xml .testutil .failure .JacksonTestFailureExpected ;
99
10- import static org .junit .Assert . assertEquals ;
10+ import static org .junit .jupiter . api . Assertions .* ;
1111
1212// [dataformat-xml#734]
13- public class XmlRecordDeser734Test extends XmlTestBase
13+ public class XmlRecordDeser734Test extends XmlTestUtil
1414{
15-
1615 record Amount (@ JacksonXmlText String value ,
1716 @ JacksonXmlProperty (isAttribute = true , localName = "Ccy" ) String currency ) {}
1817
1918 private final String XML =
2019 a2q ("<Amt Ccy='EUR'>1</Amt>" );
2120
22- // @JacksonTestFailureExpected
21+ @ JacksonTestFailureExpected
2322 @ Test
2423 public void testDeser () throws Exception {
2524 XmlMapper mapper = new XmlMapper ();
Original file line number Diff line number Diff line change 44
55import org .junit .jupiter .api .Test ;
66
7- import com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
7+ import com .fasterxml .jackson .dataformat .xml .XmlTestUtil ;
88import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlElementWrapper ;
99import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlProperty ;
1010import com .fasterxml .jackson .dataformat .xml .testutil .failure .JacksonTestFailureExpected ;
1111
12+ import static org .junit .jupiter .api .Assertions .assertEquals ;
13+
1214// [databind#517] XML wrapper doesn't work with java records
1315// Equivalent to on in jdk17/.../deser/XmlWrapperRecord517Test.java
1416public class XmlWrapperRecord517Test
15- extends XmlTestBase
17+ extends XmlTestUtil
1618{
17-
1819 public record Request (
1920 @ JacksonXmlElementWrapper (localName = "messages" )
2021 @ JacksonXmlProperty (localName = "message" )
2122 List <Message > messages
2223 ) {
2324 public Request {}
2425
25- private Request () {this (null );}
26+ protected Request () {this (null );}
2627 }
2728
2829 public record Message (String text ) {
2930 public Message {
3031 }
3132
32- private Message () {
33+ protected Message () {
3334 this (null );
3435 }
3536 }
Original file line number Diff line number Diff line change 1313import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlProperty ;
1414import com .fasterxml .jackson .module .jakarta .xmlbind .JakartaXmlBindAnnotationIntrospector ;
1515
16+ @ Deprecated // since 2.19
1617public abstract class XmlTestBase
1718 extends TestCase
1819{
19-
2020 protected static final String DEFAULT_NEW_LINE ;
2121
2222 static {
You can’t perform that action at this time.
0 commit comments