Skip to content

Commit

Permalink
优化单元测试用例中用于测试 Bean 类字段的排序
Browse files Browse the repository at this point in the history
  • Loading branch information
getActivity committed Mar 20, 2024
1 parent bc5a08e commit 53071ce
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.hjq.gson.factory.test

data class DataClassBean(
var name: String = "轮子哥",
var alias: String,
var address: String? = "",
var company: String?,
var age: Int = 20,
var weight: Int,
var stature: Int? = 180,
var alias: String,
var child: DataClassChildBean,
var company: String?,
var interest: List<String>,
var child: DataClassChildBean
var name: String = "轮子哥",
var stature: Int? = 180,
var weight: Int
)
62 changes: 31 additions & 31 deletions app/src/androidTest/java/com/hjq/gson/factory/test/JsonBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
*/
public final class JsonBean {

private List<String> listTest1;
private List<Double> listTest2;
private List<Integer> listTest3;
private List<Boolean> listTest4;
private List<Double> listTest5;
private TestBean bean1;
private TestBean bean2;

private BigDecimal bigDecimal1;
private BigDecimal bigDecimal2;
private BigDecimal bigDecimal3;

private boolean booleanTest1;
private boolean booleanTest2;
Expand All @@ -27,50 +28,49 @@ public final class JsonBean {
private boolean booleanTest5;
private boolean booleanTest6;

private String stringTest1;
private String stringTest2;
private String stringTest3;
private String stringTest4;
private String stringTest5;
private double doubleTest1;
private double doubleTest2;
private double doubleTest3;
private double doubleTest4;
private double doubleTest5;

private float floatTest1;
private float floatTest2;
private float floatTest3;
private float floatTest4;
private float floatTest5;

private int intTest1;
private int intTest2;
private int intTest3;
private int intTest4;
private int intTest5;

private JSONObject jsonObject;
private JSONArray jsonArray;

private List<String> listTest1;
private List<Double> listTest2;
private List<Integer> listTest3;
private List<Boolean> listTest4;
private List<Double> listTest5;

private long longTest1;
private long longTest2;
private long longTest3;
private long longTest4;
private long longTest5;

private float floatTest1;
private float floatTest2;
private float floatTest3;
private float floatTest4;
private float floatTest5;

private double doubleTest1;
private double doubleTest2;
private double doubleTest3;
private double doubleTest4;
private double doubleTest5;

private BigDecimal bigDecimal1;
private BigDecimal bigDecimal2;
private BigDecimal bigDecimal3;

private TestBean bean1;
private TestBean bean2;

private Map<String, Boolean> map1;
private Map<String, Integer> map2;
private Map<String, Integer> map3;
private Map<String, Integer> map4;

private JSONObject jsonObject;
private JSONArray jsonArray;
private String stringTest1;
private String stringTest2;
private String stringTest3;
private String stringTest4;
private String stringTest5;

private static class TestBean {

Expand Down

0 comments on commit 53071ce

Please sign in to comment.