Exemple #1
0
        public void TestSimple()
        {
            var p = new PointSimple()
            {
                X = 10, Y = 20
            };

            var json = Json.Format(p);

            Assert.Equal("\"10,20\"", json);

            var p2 = Json.Parse <PointSimple>(json);

            Assert.Equal(p.X, p2.X);
            Assert.Equal(p.Y, p2.Y);
        }
Exemple #2
0
        public void TestSimple()
        {
            var p = new PointSimple() { X = 10, Y = 20 };

            var json = Json.Format(p);

            Assert.AreEqual(json, "\"10,20\"");

            var p2 = Json.Parse<PointSimple>(json);

            Assert.Equals(p.X, p2.X);
            Assert.Equals(p.Y, p2.Y);
        }