Example #1
0
        public void NotSetDataHaveDefaultValue()
        {
            var data = Encode(@"{ ""Double"": 10.5, ""String"": ""Text"" }");

            var model = new StackOnlyType(data);

            Assert.AreEqual(default, model.Int);
Example #2
0
        public void DeserializesData()
        {
            var data = Encode(@"{ ""Double"": 10.5, ""Int"": 3, ""String"": ""Text"" }");

            var model = new StackOnlyType(data);

            Assert.AreEqual(10.5, model.Double);
            Assert.AreEqual(3, model.Int);
            Assert.AreEqual("Text", model.String);
        }