public void TestMaxValue() { var all = new AllTypes(); all.Init(); all.Bool = true; all.Byte = Byte.MaxValue; all.SByte = SByte.MaxValue; all.Short = short.MaxValue; all.UShort = ushort.MaxValue; all.Int = int.MaxValue; all.UInt = uint.MaxValue; all.Long = long.MaxValue; all.ULong = ulong.MaxValue; all.Decimal = decimal.MaxValue; all.Float = float.MaxValue; all.Double = double.MaxValue; var json = Json.Format(all); Console.WriteLine(json); var all2 = Json.Parse <AllTypes>(json); Compare(all, all2); }
public void TestBasics() { var all = new AllTypes(); all.Init(); var json = Json.Format(all); var all2 = Json.Parse<AllTypes>(json); Compare(all, all2); }
public void TestBasics() { var all = new AllTypes(); all.Init(); var json = Json.Format(all); var all2 = Json.Parse <AllTypes>(json); Compare(all, all2); }
public void TestNegatives() { var all = new AllTypes(); all.Init(); all.SByte = -1; all.Short = -2; all.Int = -3; all.Long = -4; all.Decimal = -5.1M; all.Float = -6.2f; all.Double = -7.3; var json = Json.Format(all); var all2 = Json.Parse<AllTypes>(json); Compare(all, all2); }
public void TestNegatives() { var all = new AllTypes(); all.Init(); all.SByte = -1; all.Short = -2; all.Int = -3; all.Long = -4; all.Decimal = -5.1M; all.Float = -6.2f; all.Double = -7.3; var json = Json.Format(all); var all2 = Json.Parse <AllTypes>(json); Compare(all, all2); }
public void TestMaxValue() { var all = new AllTypes(); all.Init(); all.Bool = true; all.Byte = Byte.MaxValue; all.SByte = SByte.MaxValue; all.Short = short.MaxValue; all.UShort = ushort.MaxValue; all.Int = int.MaxValue; all.UInt = uint.MaxValue; all.Long = long.MaxValue; all.ULong = ulong.MaxValue; all.Decimal = decimal.MaxValue; all.Float = float.MaxValue; all.Double = double.MaxValue; var json = Json.Format(all); Console.WriteLine(json); var all2 = Json.Parse<AllTypes>(json); Compare(all, all2); }