private static void VerifySelectSupportType(SelectSupportType select)
        {
            Assert.NotNull(select);

            Assert.Null(select.TopSupported);
            Assert.Null(select.SkipSupported);
            Assert.Null(select.ComputeSupported);
            Assert.Null(select.Countable);
            Assert.Null(select.Sortable);

            Assert.True(select.Supported);
            Assert.False(select.Expandable);
            Assert.True(select.Filterable);
            Assert.True(select.Searchable);
        }
        public void InitializeSelectSupportTypeTypeWorksWithCsdl()
        {
            // Arrange
            string annotation = @"<Annotation Term=""Org.OData.Capabilities.V1.SelectSupport"">
                <Record>
                  <PropertyValue Property=""Supported"" Bool=""true"" />
                  <PropertyValue Property=""Filterable"" Bool=""true"" />
                  <PropertyValue Property=""Expandable"" Bool=""false"" />
                  <PropertyValue Property=""Searchable"" Bool=""true"" />
                </Record>
              </Annotation>";

            IEdmModel model = GetEdmModel(annotation);

            Assert.NotNull(model); // guard
            Assert.NotNull(model.EntityContainer);

            // Act
            SelectSupportType select = model.GetRecord <SelectSupportType>(model.EntityContainer);

            // Assert
            VerifySelectSupportType(select);
        }
        public void InitializSelectSupportTypeWithRecordSuccess()
        {
            // Assert
            IEdmRecordExpression record = new EdmRecordExpression(
                new EdmPropertyConstructor("Supported", new EdmBooleanConstant(true)),
                new EdmPropertyConstructor("Filterable", new EdmBooleanConstant(true)),
                new EdmPropertyConstructor("Expandable", new EdmBooleanConstant(false)),
                new EdmPropertyConstructor("Searchable", new EdmBooleanConstant(true))
                // TopSupported
                // SkipSupported
                // ComputeSupported
                // Countable
                // Sortable
                );

            // Act
            SelectSupportType select = new SelectSupportType();

            select.Initialize(record);

            // Assert
            VerifySelectSupportType(select);
        }