File tree 4 files changed +17
-16
lines changed
test/java/com/fasterxml/jackson/dataformat/xml
test-jdk17/java/com/fasterxml/jackson/dataformat/xml
4 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 6
6
import java .util .stream .Collectors ;
7
7
import java .util .stream .Stream ;
8
8
9
- import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
10
- import com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
9
+ import com .fasterxml .jackson .dataformat .xml .*;
11
10
12
- public class Java17CollectionsTest extends XmlTestBase
11
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
12
+
13
+ public class Java17CollectionsTest extends XmlTestUtil
13
14
{
14
15
private final XmlMapper _xmlMapper = new XmlMapper ();
15
16
Original file line number Diff line number Diff line change 1
1
package com .fasterxml .jackson .dataformat .xml .records .failing ;
2
2
3
- import org .junit .Test ;
3
+ import org .junit .jupiter . api . Test ;
4
4
5
- import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
6
- import com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
5
+ import com .fasterxml .jackson .dataformat .xml .*;
7
6
import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlProperty ;
8
7
import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlText ;
8
+ import com .fasterxml .jackson .dataformat .xml .testutil .failure .JacksonTestFailureExpected ;
9
9
10
- import static org .junit .Assert . assertEquals ;
10
+ import static org .junit .jupiter . api . Assertions .* ;
11
11
12
12
// [dataformat-xml#734]
13
- public class XmlRecordDeser734Test extends XmlTestBase
13
+ public class XmlRecordDeser734Test extends XmlTestUtil
14
14
{
15
-
16
15
record Amount (@ JacksonXmlText String value ,
17
16
@ JacksonXmlProperty (isAttribute = true , localName = "Ccy" ) String currency ) {}
18
17
19
18
private final String XML =
20
19
a2q ("<Amt Ccy='EUR'>1</Amt>" );
21
20
22
- // @JacksonTestFailureExpected
21
+ @ JacksonTestFailureExpected
23
22
@ Test
24
23
public void testDeser () throws Exception {
25
24
XmlMapper mapper = new XmlMapper ();
Original file line number Diff line number Diff line change 4
4
5
5
import org .junit .jupiter .api .Test ;
6
6
7
- import com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
7
+ import com .fasterxml .jackson .dataformat .xml .XmlTestUtil ;
8
8
import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlElementWrapper ;
9
9
import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlProperty ;
10
10
import com .fasterxml .jackson .dataformat .xml .testutil .failure .JacksonTestFailureExpected ;
11
11
12
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
13
+
12
14
// [databind#517] XML wrapper doesn't work with java records
13
15
// Equivalent to on in jdk17/.../deser/XmlWrapperRecord517Test.java
14
16
public class XmlWrapperRecord517Test
15
- extends XmlTestBase
17
+ extends XmlTestUtil
16
18
{
17
-
18
19
public record Request (
19
20
@ JacksonXmlElementWrapper (localName = "messages" )
20
21
@ JacksonXmlProperty (localName = "message" )
21
22
List <Message > messages
22
23
) {
23
24
public Request {}
24
25
25
- private Request () {this (null );}
26
+ protected Request () {this (null );}
26
27
}
27
28
28
29
public record Message (String text ) {
29
30
public Message {
30
31
}
31
32
32
- private Message () {
33
+ protected Message () {
33
34
this (null );
34
35
}
35
36
}
Original file line number Diff line number Diff line change 13
13
import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlProperty ;
14
14
import com .fasterxml .jackson .module .jakarta .xmlbind .JakartaXmlBindAnnotationIntrospector ;
15
15
16
+ @ Deprecated // since 2.19
16
17
public abstract class XmlTestBase
17
18
extends TestCase
18
19
{
19
-
20
20
protected static final String DEFAULT_NEW_LINE ;
21
21
22
22
static {
You can’t perform that action at this time.
0 commit comments