public void InitializeDeepUpdateSupportTypeWorksWithCsdl()
        {
            // Arrange
            string annotation = @"
                <Annotation Term=""Org.OData.Capabilities.V1.DeepUpdateSupport"" >
                  <Record>
                    <PropertyValue Property=""Supported"" Bool=""false"" />
                    <PropertyValue Property=""ContentIDSupported"" Bool=""true"" />
                  </Record>
                </Annotation>";

            IEdmModel model = CapabilitiesModelHelper.GetEdmModelSetInline(annotation);

            Assert.NotNull(model); // guard

            IEdmEntitySet calendars = model.EntityContainer.FindEntitySet("Calendars");

            Assert.NotNull(calendars); // guard

            // Act
            DeepUpdateSupportType deepUpdate = model.GetRecord <DeepUpdateSupportType>(calendars);

            // Assert
            VerifyDeepUpdateSupportType(deepUpdate);
        }
        private static void VerifyDeepUpdateSupportType(DeepUpdateSupportType deepUpdate)
        {
            Assert.NotNull(deepUpdate);

            Assert.NotNull(deepUpdate.Supported);
            Assert.False(deepUpdate.Supported.Value);

            Assert.NotNull(deepUpdate.ContentIDSupported);
            Assert.True(deepUpdate.ContentIDSupported.Value);
        }
        public void InitializeDeepUpdateSupportTypeWithRecordSuccess()
        {
            // Assert
            IEdmRecordExpression record = new EdmRecordExpression(
                new EdmPropertyConstructor("Supported", new EdmBooleanConstant(false)),
                new EdmPropertyConstructor("ContentIDSupported", new EdmBooleanConstant(true)));

            // Act
            DeepUpdateSupportType deepUpdate = new DeepUpdateSupportType();

            deepUpdate.Initialize(record);

            // Assert
            VerifyDeepUpdateSupportType(deepUpdate);
        }