public void GetPropertyValueExtensions_GetPropValueGeneric_NoProperty()
 {
     Object value = GetPropertyValueExtensions.GetPropValue <Object>(TestObject, null);
 }
        public void GetPropertyValueExtensions_GetPropValueGeneric_NoExistantProperty()
        {
            Object value = GetPropertyValueExtensions.GetPropValue <Object>(TestObject, "fake-property");

            Assert.IsNull(value);
        }
        public void GetPropertyValueExtensions_GetPropValue_LaterChild()
        {
            Object value = GetPropertyValueExtensions.GetPropValue(TestObject, "ObjectProp.Child");

            Assert.AreEqual("this is a grandchild node", value);
        }
        public void GetPropertyValueExtensions_GetPropValueGeneric_NullObject()
        {
            Object value = GetPropertyValueExtensions.GetPropValue <Object>(null, "");

            Assert.IsNull(value);
        }
 public void GetPropertyValueExtensions_GetPropValue_NoProperty()
 {
     Object value = GetPropertyValueExtensions.GetPropValue(TestObject, null);
 }
        public void GetPropertyValueExtensions_GetPropValue_FirstChild()
        {
            Object value = GetPropertyValueExtensions.GetPropValue(TestObject, "StringProp");

            Assert.AreEqual("this is a string", value);
        }
        public void GetPropertyValueExtensions_GetStringPropValue_ValidType()
        {
            String value = GetPropertyValueExtensions.GetStringPropValue(TestObject, "StringProp");

            Assert.AreEqual("this is a string", value);
        }
        public void GetPropertyValueExtensions_GetStringPropValue_NoExistantProperty()
        {
            String value = GetPropertyValueExtensions.GetStringPropValue(TestObject, "fake-property");

            Assert.IsNull(value);
        }
        public void GetPropertyValueExtensions_GetStringPropValue_NullObject()
        {
            String value = GetPropertyValueExtensions.GetStringPropValue(null, "");

            Assert.IsNull(value);
        }
        public void GetPropertyValueExtensions_GetPropValueGeneric_ValidType()
        {
            int value = GetPropertyValueExtensions.GetPropValue <int>(TestObject, "ObjectProp.Number");

            Assert.AreEqual(10, value);
        }
 public void GetPropertyValueExtensions_GetPropValueGeneric_InvalidType()
 {
     Object value = GetPropertyValueExtensions.GetPropValue <List <bool> >(TestObject, "StringProp");
 }