Exemple #1
0
        private static void VerifyFilterRestrictions(FilterRestrictions filter)
        {
            Assert.NotNull(filter);

            Assert.NotNull(filter.Filterable);
            Assert.False(filter.Filterable.Value);

            Assert.NotNull(filter.RequiresFilter);
            Assert.False(filter.RequiresFilter.Value);

            Assert.NotNull(filter.RequiredProperties);
            Assert.Single(filter.RequiredProperties);
            Assert.Equal("Id", filter.RequiredProperties.First());

            Assert.NotNull(filter.NonFilterableProperties);
            Assert.Single(filter.NonFilterableProperties);
            Assert.Equal("Emails", filter.NonFilterableProperties.First());

            Assert.True(filter.IsRequiredProperty("Id"));
            Assert.False(filter.IsRequiredProperty("ID"));

            Assert.True(filter.IsNonFilterableProperty("Emails"));
            Assert.False(filter.IsNonFilterableProperty("ID"));
        }