コード例 #1
0
 @org.junit.Test
 public void testBorderValue6Equality() throws IOException {
   final Long borderValue6 = Long.MAX_VALUE;
   final StaticJson.Bytes borderValue6JsonSerialized = jsonSerialization.serialize(borderValue6);
   final Long borderValue6JsonDeserialized =
       jsonSerialization.deserialize(
           Long.class, borderValue6JsonSerialized.content, borderValue6JsonSerialized.length);
   LongAsserts.assertNullableEquals(borderValue6, borderValue6JsonDeserialized);
 }
コード例 #2
0
 @org.junit.Test
 public void testDefaultValueEquality() throws IOException {
   final Long defaultValue = null;
   final StaticJson.Bytes defaultValueJsonSerialized = jsonSerialization.serialize(defaultValue);
   final Long defaultValueJsonDeserialized =
       jsonSerialization.deserialize(
           Long.class, defaultValueJsonSerialized.content, defaultValueJsonSerialized.length);
   LongAsserts.assertNullableEquals(defaultValue, defaultValueJsonDeserialized);
 }
 @org.junit.Test
 public void testDefaultValueEquality() throws IOException {
   final java.util.List<java.math.BigDecimal> defaultValue = null;
   final StaticJson.Bytes defaultValueJsonSerialized = jsonSerialization.serialize(defaultValue);
   final java.util.List<java.math.BigDecimal> defaultValueJsonDeserialized =
       jsonSerialization.deserializeList(
           java.math.BigDecimal.class,
           defaultValueJsonSerialized.content,
           defaultValueJsonSerialized.length);
   MoneyAsserts.assertNullableListOfNullableEquals(defaultValue, defaultValueJsonDeserialized);
 }
 @org.junit.Test
 public void testBorderValue3Equality() throws IOException {
   final java.util.List<java.math.BigDecimal> borderValue3 =
       new java.util.ArrayList<java.math.BigDecimal>(
           java.util.Arrays.asList(new java.math.BigDecimal("1E19")));
   final StaticJson.Bytes borderValue3JsonSerialized = jsonSerialization.serialize(borderValue3);
   final java.util.List<java.math.BigDecimal> borderValue3JsonDeserialized =
       jsonSerialization.deserializeList(
           java.math.BigDecimal.class,
           borderValue3JsonSerialized.content,
           borderValue3JsonSerialized.length);
   MoneyAsserts.assertNullableListOfNullableEquals(borderValue3, borderValue3JsonDeserialized);
 }
 @org.junit.Test
 public void testDefaultValueEquality() throws IOException {
   final java.util.Set<java.awt.Point> defaultValue = null;
   final StaticJson.Bytes defaultValueJsonSerialized = jsonSerialization.serialize(defaultValue);
   final java.util.List<java.awt.Point> deserializedTmpList =
       jsonSerialization.deserializeList(
           java.awt.Point.class,
           defaultValueJsonSerialized.content,
           defaultValueJsonSerialized.length);
   final java.util.Set<java.awt.Point> defaultValueJsonDeserialized =
       deserializedTmpList == null
           ? null
           : new java.util.HashSet<java.awt.Point>(deserializedTmpList);
   PointAsserts.assertNullableSetOfNullableEquals(defaultValue, defaultValueJsonDeserialized);
 }
 @org.junit.Test
 public void testBorderValue2Equality() throws IOException {
   final java.util.Set<java.awt.Point> borderValue2 =
       new java.util.HashSet<java.awt.Point>(java.util.Arrays.asList(new java.awt.Point()));
   final StaticJson.Bytes borderValue2JsonSerialized = jsonSerialization.serialize(borderValue2);
   final java.util.List<java.awt.Point> deserializedTmpList =
       jsonSerialization.deserializeList(
           java.awt.Point.class,
           borderValue2JsonSerialized.content,
           borderValue2JsonSerialized.length);
   final java.util.Set<java.awt.Point> borderValue2JsonDeserialized =
       deserializedTmpList == null
           ? null
           : new java.util.HashSet<java.awt.Point>(deserializedTmpList);
   PointAsserts.assertNullableSetOfNullableEquals(borderValue2, borderValue2JsonDeserialized);
 }
 @org.junit.Test
 public void testBorderValue4Equality() throws IOException {
   final java.util.List<java.math.BigDecimal> borderValue4 =
       new java.util.ArrayList<java.math.BigDecimal>(
           java.util.Arrays.asList(
               java.math.BigDecimal.ZERO.setScale(2),
               java.math.BigDecimal.ONE,
               new java.math.BigDecimal(
                       "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679")
                   .setScale(2, java.math.BigDecimal.ROUND_HALF_UP),
               new java.math.BigDecimal("-1E-2"),
               new java.math.BigDecimal("1E19")));
   final StaticJson.Bytes borderValue4JsonSerialized = jsonSerialization.serialize(borderValue4);
   final java.util.List<java.math.BigDecimal> borderValue4JsonDeserialized =
       jsonSerialization.deserializeList(
           java.math.BigDecimal.class,
           borderValue4JsonSerialized.content,
           borderValue4JsonSerialized.length);
   MoneyAsserts.assertNullableListOfNullableEquals(borderValue4, borderValue4JsonDeserialized);
 }
 @org.junit.Test
 public void testBorderValue5Equality() throws IOException {
   final java.util.Set<java.awt.Point> borderValue5 =
       new java.util.HashSet<java.awt.Point>(
           java.util.Arrays.asList(
               (java.awt.Point) null,
               new java.awt.Point(),
               new java.awt.Point(Integer.MIN_VALUE, Integer.MIN_VALUE),
               new java.awt.Point(Integer.MAX_VALUE, Integer.MAX_VALUE),
               new java.awt.Point(0, -1000000000),
               new java.awt.Point(0, 1000000000)));
   final StaticJson.Bytes borderValue5JsonSerialized = jsonSerialization.serialize(borderValue5);
   final java.util.List<java.awt.Point> deserializedTmpList =
       jsonSerialization.deserializeList(
           java.awt.Point.class,
           borderValue5JsonSerialized.content,
           borderValue5JsonSerialized.length);
   final java.util.Set<java.awt.Point> borderValue5JsonDeserialized =
       deserializedTmpList == null
           ? null
           : new java.util.HashSet<java.awt.Point>(deserializedTmpList);
   PointAsserts.assertNullableSetOfNullableEquals(borderValue5, borderValue5JsonDeserialized);
 }