/**
* java基本类型模拟测试
*/
@Test
public void testBasic() {
//基本类型模拟
byte byte1 = Mock.mock(byte.class);
System.err.println(byte1);
short short1 = Mock.mock(short.class);
System.err.println(short1);
int int1 = Mock.mock(int.class);
System.err.println(int1);
long long1 = Mock.mock(long.class);
System.err.println(long1);
double double1 = Mock.mock(double.class);
System.err.println(double1);
float float1 = Mock.mock(float.class);
System.err.println(float1);
char char1 = Mock.mock(char.class);
System.err.println(char1);
boolean boolean1 = Mock.mock(boolean.class);
System.err.println(boolean1);
//基本类型封装类模拟
Byte byte2 = Mock.mock(Byte.class);
System.err.println(byte2);
Short short2 = Mock.mock(Short.class);
System.err.println(short2);
Integer int2 = Mock.mock(Integer.class);
System.err.println(int2);
Long long2 = Mock.mock(Long.class);
System.err.println(long2);
Double double2 = Mock.mock(Double.class);
System.err.println(double2);
Float float2 = Mock.mock(Float.class);
System.err.println(float2);
Character char2 = Mock.mock(Character.class);
System.err.println(char2);
Boolean boolean2 = Mock.mock(Boolean.class);
System.err.println(boolean2);
//常用类型模拟
//字符串
String string = Mock.mock(String.class);
System.err.println(string);
//大精度
BigDecimal bigDecimal = Mock.mock(BigDecimal.class);
System.err.println(bigDecimal);
//大整形
BigInteger bigInteger = Mock.mock(BigInteger.class);
System.out.println(bigInteger);
//日期
Date date = Mock.mock(Date.class);
System.out.println(date);
//枚举
DayEnum dayEnum = Mock.mock(DayEnum.class);
System.out.println(dayEnum);
}
/**
* 基本类型的数组类型模拟测试
*/
@Test
public void testArray() {
//基本类型 数组 模拟
byte[] byte1 = Mock.mock(byte[].class);
System.err.println(JsonUtil.toStr(byte1));//byte转json 这里做了new string 打印是string
//循环打印出来
for (byte b:byte1){
System.out.println(b);
}
short[] short1 = Mock.mock(short[].class);
System.err.println(JsonUtil.toStr(short1));
int[] int1 = Mock.mock(int[].class);
System.err.println(JsonUtil.toStr(int1));
long[] long1 = Mock.mock(long[].class);
System.err.println(JsonUtil.toStr(long1));
double[] double1 = Mock.mock(double[].class);
System.err.println(JsonUtil.toStr(double1));
float[] float1 = Mock.mock(float[].class);
System.err.println(JsonUtil.toStr(float1));
char[] char1 = Mock.mock(char[].class);
System.err.println(JsonUtil.toStr(char1));
boolean[] boolean1 = Mock.mock(boolean[].class);
System.err.println(JsonUtil.toStr(boolean1));
//基本类型封装类模拟
Byte[] byte2 = Mock.mock(Byte[].class);
System.err.println(JsonUtil.toStr(byte2));
Short[] short2 = Mock.mock(Short[].class);
System.err.println(JsonUtil.toStr(short2));
Integer[] int2 = Mock.mock(Integer[].class);
System.err.println(JsonUtil.toStr(int2));
Long[] long2 = Mock.mock(Long[].class);
System.err.println(JsonUtil.toStr(long2));
Double[] double2 = Mock.mock(Double[].class);
System.err.println(JsonUtil.toStr(double2));
Float[] float2 = Mock.mock(Float[].class);
System.err.println(JsonUtil.toStr(float2));
Character[] char2 = Mock.mock(Character[].class);
System.err.println(JsonUtil.toStr(char2));
Boolean[] boolean2 = Mock.mock(Boolean[].class);
System.err.println(JsonUtil.toStr(boolean2));
//常用类型 数组 模拟
//字符串
String[] string = Mock.mock(String[].class);
System.err.println(JsonUtil.toStr(string));
//大精度
BigDecimal[] bigDecimal = Mock.mock(BigDecimal[].class);
System.err.println(JsonUtil.toStr(bigDecimal));
//大整形
BigInteger[] bigInteger = Mock.mock(BigInteger[].class);
System.out.println(JsonUtil.toStr(bigInteger));
//日期
Date[] date = Mock.mock(Date[].class);
System.out.println(JsonUtil.toStr(date));
//枚举
DayEnum[] dayEnum = Mock.mock(DayEnum[].class);
System.out.println(JsonUtil.toStr(dayEnum));
}
/**
* 基本类型的二维数组模拟测试
*/
@Test
public void testArray2() {
//基本类型 二维数组 模拟
byte[][] byte1 = Mock.mock(byte[][].class);
System.err.println(JsonUtil.toStr(byte1));//byte转json 这里做了new string 打印是string
short[][] short1 = Mock.mock(short[][].class);
System.err.println(JsonUtil.toStr(short1));
int[][] int1 = Mock.mock(int[][].class);
System.err.println(JsonUtil.toStr(int1));
long[][] long1 = Mock.mock(long[][].class);
System.err.println(JsonUtil.toStr(long1));
double[][] double1 = Mock.mock(double[][].class);
System.err.println(JsonUtil.toStr(double1));
float[][] float1 = Mock.mock(float[][].class);
System.err.println(JsonUtil.toStr(float1));
char[][] char1 = Mock.mock(char[][].class);
System.err.println(JsonUtil.toStr(char1));
boolean[][] boolean1 = Mock.mock(boolean[][].class);
System.err.println(JsonUtil.toStr(boolean1));
//基本类型封装类模拟
Byte[][] byte2 = Mock.mock(Byte[][].class);
System.err.println(JsonUtil.toStr(byte2));
Short[][] short2 = Mock.mock(Short[][].class);
System.err.println(JsonUtil.toStr(short2));
Integer[][] int2 = Mock.mock(Integer[][].class);
System.err.println(JsonUtil.toStr(int2));
Long[][] long2 = Mock.mock(Long[][].class);
System.err.println(JsonUtil.toStr(long2));
Double[][] double2 = Mock.mock(Double[][].class);
System.err.println(JsonUtil.toStr(double2));
Float[][] float2 = Mock.mock(Float[][].class);
System.err.println(JsonUtil.toStr(float2));
Character[][] char2 = Mock.mock(Character[][].class);
System.err.println(JsonUtil.toStr(char2));
Boolean[][] boolean2 = Mock.mock(Boolean[][].class);
System.err.println(JsonUtil.toStr(boolean2));
//常用类型 数组 模拟
//字符串
String[][] string = Mock.mock(String[][].class);
System.err.println(JsonUtil.toStr(string));
//大精度
BigDecimal[][] bigDecimal = Mock.mock(BigDecimal[][].class);
System.err.println(JsonUtil.toStr(bigDecimal));
//大整形
BigInteger[][] bigInteger = Mock.mock(BigInteger[][].class);
System.out.println(JsonUtil.toStr(bigInteger));
//日期
Date[][] date = Mock.mock(Date[][].class);
System.out.println(JsonUtil.toStr(date));
//枚举
DayEnum[][] dayEnum = Mock.mock(DayEnum[][].class);
System.out.println(JsonUtil.toStr(dayEnum));
}
/**
* 基本类型的多维数组测试
*/
@Test
public void testArray3() {
//基本类型 三维数组 模拟
byte[][][] byte1 = Mock.mock(byte[][][].class);
System.err.println(JsonUtil.toStr(byte1));//byte转json 这里做了new string 打印是string
short[][][] short1 = Mock.mock(short[][][].class);
System.err.println(JsonUtil.toStr(short1));
int[][][] int1 = Mock.mock(int[][][].class);
System.err.println(JsonUtil.toStr(int1));
long[][][] long1 = Mock.mock(long[][][].class);
System.err.println(JsonUtil.toStr(long1));
double[][][] double1 = Mock.mock(double[][][].class);
System.err.println(JsonUtil.toStr(double1));
float[][][] float1 = Mock.mock(float[][][].class);
System.err.println(JsonUtil.toStr(float1));
char[][][] char1 = Mock.mock(char[][][].class);
System.err.println(JsonUtil.toStr(char1));
boolean[][][] boolean1 = Mock.mock(boolean[][][].class);
System.err.println(JsonUtil.toStr(boolean1));
//基本类型封装类模拟
Byte[][][] byte2 = Mock.mock(Byte[][][].class);
System.err.println(JsonUtil.toStr(byte2));
Short[][][] short2 = Mock.mock(Short[][][].class);
System.err.println(JsonUtil.toStr(short2));
Integer[][][] int2 = Mock.mock(Integer[][][].class);
System.err.println(JsonUtil.toStr(int2));
Long[][][] long2 = Mock.mock(Long[][][].class);
System.err.println(JsonUtil.toStr(long2));
Double[][][] double2 = Mock.mock(Double[][][].class);
System.err.println(JsonUtil.toStr(double2));
Float[][][] float2 = Mock.mock(Float[][][].class);
System.err.println(JsonUtil.toStr(float2));
Character[][][] char2 = Mock.mock(Character[][][].class);
System.err.println(JsonUtil.toStr(char2));
Boolean[][][] boolean2 = Mock.mock(Boolean[][][].class);
System.err.println(JsonUtil.toStr(boolean2));
//常用类型 数组 模拟
//字符串
String[][][] string = Mock.mock(String[][][].class);
System.err.println(JsonUtil.toStr(string));
//大精度
BigDecimal[][][] bigDecimal = Mock.mock(BigDecimal[][][].class);
System.err.println(JsonUtil.toStr(bigDecimal));
//大整形
BigInteger[][][] bigInteger = Mock.mock(BigInteger[][][].class);
System.out.println(JsonUtil.toStr(bigInteger));
//日期
Date[][][] date = Mock.mock(Date[][][].class);
System.out.println(JsonUtil.toStr(date));
//枚举
DayEnum[][][] dayEnum = Mock.mock(DayEnum[][][].class);
System.out.println(JsonUtil.toStr(dayEnum));
}