public void ChangeFeedRequestOptions_StartFromNow()
        {
            RequestMessage request = new RequestMessage();
            ChangeFeedStartFromRequestOptionPopulator visitor = new ChangeFeedStartFromRequestOptionPopulator(request);

            ChangeFeedStartFrom.Now().Accept(visitor);

            Assert.AreEqual(expected: "*", request.Headers.IfNoneMatch);
            Assert.IsNull(request.Headers[Documents.HttpConstants.HttpHeaders.IfModifiedSince]);
        }
        public void ChangeFeedRequestOptions_AddsFeedRange()
        {
            FeedRange feedRange = new FeedRangePartitionKeyRange("randomPK");

            ChangeFeedStartFrom[] froms = new ChangeFeedStartFrom[]
            {
                ChangeFeedStartFrom.Beginning(feedRange),
                ChangeFeedStartFrom.Now(feedRange),
                ChangeFeedStartFrom.Time(DateTime.MinValue.ToUniversalTime(), feedRange)
            };

            foreach (ChangeFeedStartFrom from in froms)
            {
                RequestMessage request = new RequestMessage();
                ChangeFeedStartFromRequestOptionPopulator visitor = new ChangeFeedStartFromRequestOptionPopulator(request);
                from.Accept(visitor);

                Assert.AreEqual(
                    expected: "randomPK",
                    actual: request.PartitionKeyRangeId.PartitionKeyRangeId);
            }
        }