Exemplo n.º 1
0
        public void TestQueryStringReturnsForValidFilters()
        {
            var filters = new ISearchFilter[]
            {
                new SkipSearchFilter(0),
                new LimitSearchFilter(15),
                new EqualitySearchFilter("test", "true"),
            };
            var          result = ContentfulClient.GetQueryStringFromSearchFilters(filters);
            const string expectedQueryString = "skip=0&limit=15&test=true";

            Assert.AreEqual(expectedQueryString, result);
        }
Exemplo n.º 2
0
        public void TestQueryStringReturnsNullForNullFilters()
        {
            var result = ContentfulClient.GetQueryStringFromSearchFilters(null);

            Assert.IsNull(result);
        }