Skip to content

Commit 9c646c8

Browse files
committed
test cleanup
1 parent 6888ed4 commit 9c646c8

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

src/test/java/com/fasterxml/jackson/databind/ser/TestSerializationOrder.java

+10-19
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
public class TestSerializationOrder
1212
extends BaseMapTest
1313
{
14-
/*
15-
/**********************************************************
16-
/* Annotated helper classes
17-
/**********************************************************
18-
*/
19-
2014
static class BeanWithCreator
2115
{
2216
public int a;
@@ -33,7 +27,7 @@ static class BeanWithCreator
3327
static class BeanWithOrder
3428
{
3529
public int d, b, a, c;
36-
30+
3731
public BeanWithOrder(int a, int b, int c, int d) {
3832
this.a = a;
3933
this.b = b;
@@ -59,10 +53,10 @@ static class OrderMixIn { }
5953

6054
@JsonPropertyOrder(value={"a","b","x","z"})
6155
static class BeanFor268 {
62-
@JsonProperty("a") public String xA = "a";
63-
@JsonProperty("z") public String aZ = "z";
64-
@JsonProperty("b") public String xB() { return "b"; }
65-
@JsonProperty("x") public String aX() { return "x"; }
56+
@JsonProperty("a") public String xA = "a";
57+
@JsonProperty("z") public String aZ = "z";
58+
@JsonProperty("b") public String xB() { return "b"; }
59+
@JsonProperty("x") public String aX() { return "x"; }
6660
}
6761

6862
static class BeanFor459 {
@@ -72,7 +66,7 @@ static class BeanFor459 {
7266
public int a = 1;
7367
}
7468

75-
// For [Issue#311]
69+
// For [databind#311]
7670
@JsonPropertyOrder(alphabetic = true)
7771
public class BeanForGH311 {
7872
private final int a;
@@ -87,16 +81,15 @@ public BeanForGH311(@JsonProperty("b") int b, @JsonProperty("a") int a) { //b an
8781
public int getA() { return a; }
8882
public int getB() { return b; }
8983
}
90-
84+
9185
/*
9286
/*********************************************
9387
/* Unit tests
9488
/*********************************************
9589
*/
9690

97-
final ObjectMapper MAPPER = new ObjectMapper();
98-
99-
// Test for [JACKSON-170]
91+
private final ObjectMapper MAPPER = newJsonMapper();
92+
10093
public void testImplicitOrderByCreator() throws Exception
10194
{
10295
assertEquals("{\"c\":1,\"a\":2,\"b\":0}", MAPPER.writeValueAsString(new BeanWithCreator(1, 2)));
@@ -112,7 +105,6 @@ public void testAlphabeticOrder() throws Exception
112105
assertEquals("{\"d\":4,\"a\":1,\"b\":2,\"c\":3}", MAPPER.writeValueAsString(new SubBeanWithOrder(1, 2, 3, 4)));
113106
}
114107

115-
116108
public void testOrderWithMixins() throws Exception
117109
{
118110
ObjectMapper m = jsonMapperBuilder()
@@ -137,8 +129,7 @@ public void testOrderWithFeature() throws Exception
137129
m.writeValueAsString(new BeanFor459()));
138130
}
139131

140-
// [Issue#311]
141-
132+
// [databind#311]
142133
public void testAlphaAndCreatorOrdering() throws Exception
143134
{
144135
ObjectMapper m = jsonMapperBuilder()

0 commit comments

Comments
 (0)