Esempio n. 1
0
        public void SkipTest()
        {
            const Int32 EXPECTED = 10;

            StretchrRequest<String> target = new StretchrRequest<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { });
            target.Skip(EXPECTED);

            Int32 actual = target.QueryPagingFunctionParameterSkip;

            Assert.AreEqual(EXPECTED, actual);
        }
Esempio n. 2
0
        public void ConstructQueryPaginationTestSkip()
        {
            const Int32 PAGINATION_SKIP = 20;

            IStretchrRequest target = new StretchrRequest<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { });
            target.Skip(PAGINATION_SKIP);

            const String EXPECTED = "skip=20";

            IList<String> expected = new List<String>();
            expected.Add(EXPECTED);

            PrivateObject privateTarget = new PrivateObject(target);

            privateTarget.Invoke("ConstructQueryPagination");

            IList<String> actual = (IList<String>)privateTarget.GetField("_queryStringFieldValuesList");

            Assert.IsNotNull(actual);
            Assert.AreEqual(expected[0], actual[0]);
        }