Example #1
0
        public void Load_LoadsValidJSONIntoEntityUsingConstructor()
        {
            TestJSONEntity testEntity = new TestJSONEntity(JSONStrings.ValidJSONEntityString);

            Assert.AreEqual(testEntity.ValueOne, JSONStrings.ValidValueOne);
            Assert.AreEqual(testEntity.ValueTwo, JSONStrings.ValidValueTwo);
            Assert.AreEqual(testEntity.ValueThree, JSONStrings.ValidValueThree);
        }
Example #2
0
        public void Load_LoadsNestedJSONEntitySuccessfully()
        {
            TestJSONEntity testEntity = new TestJSONEntity();

            testEntity.Load(JSONStrings.NestedJSONEntityString);

            Assert.IsNotNull(testEntity.NestedEntity);
            Assert.AreEqual(testEntity.NestedEntity.ValueFour, JSONStrings.ValidValueFour);
            Assert.AreEqual(testEntity.NestedEntity.ValueFive, JSONStrings.ValidValueFive);
        }