File tree 2 files changed +1
-25
lines changed
trpc-core/src/test/java/com/tencent/trpc/core
2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,6 @@ public void testJson2Pojo() {
61
61
*/
62
62
@ Test
63
63
public void testJson2PojoEx () {
64
- try {
65
- JsonUtilsTest .TestObj1 obj1 = new JsonUtilsTest .TestObj1 ();
66
- obj1 .setTest (123 );
67
- serial .serialize (obj1 );
68
- Assert .fail ();
69
- } catch (Exception e ) {
70
- Assert .assertTrue (e .getMessage ().contains ("json serialize ex:" ));
71
- }
72
64
try {
73
65
byte [] bytes = serial .serialize (obj );
74
66
GenericsObj deserialize = serial .deserialize (bytes , GenericsObj .class );
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ public void testToJsonWithDefaultValue() {
135
135
TestObj1 obj1 = new TestObj1 ();
136
136
obj1 .setTest (123 );
137
137
String aaa = JsonUtils .toJson (obj1 , "aaa" );
138
- Assert .assertEquals ("aaa" , aaa );
138
+ Assert .assertEquals (EMPTY_JSON , aaa );
139
139
}
140
140
141
141
@ Test
@@ -185,12 +185,6 @@ public void testConvertValue() {
185
185
}
186
186
187
187
188
- @ Test
189
- public void testEmptyBeanSerial () {
190
- TestEmptyBean testEmptyBean = new TestEmptyBean (10 );
191
- Assert .assertEquals (EMPTY_JSON , JsonUtils .toJson (testEmptyBean ));
192
- }
193
-
194
188
public static class TestObj {
195
189
196
190
private int testA ;
@@ -239,14 +233,4 @@ public void setData(String data) {
239
233
this .data = data ;
240
234
}
241
235
}
242
-
243
- public static class TestEmptyBean {
244
-
245
- // without public getter method
246
- private int field ;
247
-
248
- public TestEmptyBean (int field ) {
249
- this .field = field ;
250
- }
251
- }
252
236
}
You can’t perform that action at this time.
0 commit comments