Exemple #1
0
        public void TestToJson()
        {
            var a = new SimpleModelType().ToJson();

            Assert.IsNotNull(a);

            Assert.IsNull(((object)null).ToJson());
        }
Exemple #2
0
        public void TestBeautifyJson()
        {
            var a = new SimpleModelType().ToJson();

            Assert.IsNotNull(Newtonsoft.Json.JsonConvert.DeserializeObject(JsonExtensions.BeautifyJson(a)));

            Assert.IsNull(JsonExtensions.BeautifyJson(null));
        }