コード例 #1
0
        public void TrySetPropertyValue_IfPropertyDoesNotExist_DoesNotUpdateGetChangedPropertyNames()
        {
            EdmComplexType edmType   = new EdmComplexType("NS", "Complex");
            var            edmObject = new TestEdmStructuredObject(edmType);

            edmObject.TrySetPropertyValue("NotPresentProperty", 42);

            Assert.DoesNotContain("Property", edmObject.GetChangedPropertyNames());
        }
コード例 #2
0
        public void TrySetPropertyValue_IfPropertyExists_UpdatesGetChangedPropertyNames()
        {
            EdmComplexType edmType = new EdmComplexType("NS", "Complex");

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

            edmObject.TrySetPropertyValue("Property", 42);

            Assert.Contains("Property", edmObject.GetChangedPropertyNames());
        }
コード例 #3
0
        public void TrySetPropertyValue_IfPropertyDoesNotExist_DoesNotUpdateGetChangedPropertyNames()
        {
            EdmComplexType edmType = new EdmComplexType("NS", "Complex");
            var edmObject = new TestEdmStructuredObject(edmType);

            edmObject.TrySetPropertyValue("NotPresentProperty", 42);

            Assert.DoesNotContain("Property", edmObject.GetChangedPropertyNames());
        }
コード例 #4
0
        public void TrySetPropertyValue_IfPropertyExists_UpdatesGetChangedPropertyNames()
        {
            EdmComplexType edmType = new EdmComplexType("NS", "Complex");
            edmType.AddStructuralProperty("Property", EdmPrimitiveTypeKind.Int32);
            var edmObject = new TestEdmStructuredObject(edmType);
            edmObject.TrySetPropertyValue("Property", 42);

            Assert.Contains("Property", edmObject.GetChangedPropertyNames());
        }