Beispiel #1
0
        public void TestToJSON()
        {
            var tclass  = TestClasses.CreateTestClass();
            var item    = JSON.ToJSON(tclass);
            var control = TestClasses.CreateTestClassJson();

            Assert.IsTrue(item == control);
        }
Beispiel #2
0
        public void TestFromJSON()
        {
            var original = TestClasses.CreateTestClass();
            var control  = TestClasses.CreateTestClassJson();
            var tclass   = JSON.FromJSON <TestClasses.TestClass>(control);

            Assert.IsTrue(original.Equals(tclass));
        }
Beispiel #3
0
        public void TestSerialize()
        {
            var serialized = TestClasses.CreateTestClassJson().ToString();

            Assert.IsTrue(!string.IsNullOrEmpty(serialized));
        }