Skip to content

Commit d54cb95

Browse files
committed
Minor test improvement
1 parent e8d5256 commit d54cb95

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

src/test/java/com/fasterxml/jackson/dataformat/xml/failing/CaseInsensitiveDeser273Test.java

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.fasterxml.jackson.dataformat.xml.failing;
22

3-
import java.util.ArrayList;
3+
import java.util.List;
44

55
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
66

@@ -18,16 +18,31 @@ static class Depots273
1818
public String taskId;
1919

2020
@JacksonXmlElementWrapper(useWrapping = false)
21-
public ArrayList<Depot273> element;
21+
public List<Depot273> element;
22+
23+
public void setElement(List<Depot273> l) {
24+
//System.err.println("setElement: "+l);
25+
element = l;
26+
}
2227
}
2328

2429
@JsonIgnoreProperties(ignoreUnknown = true)
2530
static class Depot273
2631
{
2732
@JacksonXmlProperty(isAttribute = true)
2833
public String number;
34+
2935
@JacksonXmlProperty(isAttribute = true)
3036
public String name;
37+
38+
public void setNumber(String n) {
39+
//System.err.println("SetNumber: '"+n+"'");
40+
number = n;
41+
}
42+
public void setName(String n) {
43+
//System.err.println("setName: '"+n+"'");
44+
name = n;
45+
}
3146
}
3247

3348
/*
@@ -43,14 +58,14 @@ static class Depot273
4358
public void testCaseInsensitiveComplex() throws Exception
4459
{
4560
final String DOC =
46-
"<AcResponse Command='show depots' TaskId='1260'>\n"+
61+
"<Depots273 Command='show depots' TaskId='1260'>\n"+
4762
" <Element Number='1' Name='accurev' Slice='1'\n"+
4863
"exclusiveLocking='false' case='insensitive' locWidth='128'"+
4964
"></Element>\n"+
5065
" <Element Number='2' Name='second accurev' Slice='2'\n"+
5166
"exclusiveLocking='false' case='insensitive' locWidth='128'\n"+
5267
"></Element>\n"+
53-
"</AcResponse>"
68+
"</Depots273>"
5469
;
5570

5671
Depots273 result = INSENSITIVE_MAPPER.readValue(DOC, Depots273.class);

0 commit comments

Comments
 (0)