Example #1
0
        public void TryGetPropertyType_ReturnsFalse_IfPropertyDoesNotExist()
        {
            EdmComplexType edmType   = new EdmComplexType("NS", "Complex");
            var            edmObject = new TestEdmStructuredObject(edmType);

            Type propertyType;
            bool result = edmObject.TryGetPropertyType("NotPresentProperty", out propertyType);

            Assert.False(result);
        }
Example #2
0
        public void TryGetPropertyType_ReturnsTrue_IfPropertyExists()
        {
            EdmComplexType edmType = new EdmComplexType("NS", "Complex");

            edmType.AddStructuralProperty("Property", EdmPrimitiveTypeKind.Int32);
            var edmObject = new TestEdmStructuredObject(edmType);

            Type propertyType;
            bool result = edmObject.TryGetPropertyType("Property", out propertyType);

            Assert.True(result);
        }
        public void TryGetPropertyType_ReturnsFalse_IfPropertyDoesNotExist()
        {
            EdmComplexType edmType = new EdmComplexType("NS", "Complex");
            var edmObject = new TestEdmStructuredObject(edmType);

            Type propertyType;
            bool result = edmObject.TryGetPropertyType("NotPresentProperty", out propertyType);

            Assert.False(result);
        }
        public void TryGetPropertyType_ReturnsTrue_IfPropertyExists()
        {
            EdmComplexType edmType = new EdmComplexType("NS", "Complex");
            edmType.AddStructuralProperty("Property", EdmPrimitiveTypeKind.Int32);
            var edmObject = new TestEdmStructuredObject(edmType);

            Type propertyType;
            bool result = edmObject.TryGetPropertyType("Property", out propertyType);

            Assert.True(result);
        }