Esempio n. 1
0
        public void ReadFeedIteratorCore_Create_Default()
        {
            FeedRangeIteratorCore feedTokenIterator = FeedRangeIteratorCore.Create(Mock.Of <ContainerInternal>(), null, null, null);
            FeedRangeEPK          defaultRange      = feedTokenIterator.FeedRangeInternal as FeedRangeEPK;

            Assert.AreEqual(FeedRangeEPK.ForCompleteRange().Range.Min, defaultRange.Range.Min);
            Assert.AreEqual(FeedRangeEPK.ForCompleteRange().Range.Max, defaultRange.Range.Max);
            Assert.IsNull(feedTokenIterator.FeedRangeContinuation);
        }
Esempio n. 2
0
        public void ReadFeedIteratorCore_Create_WithContinuation()
        {
            string continuation = Guid.NewGuid().ToString();
            FeedRangeIteratorCore feedTokenIterator = FeedRangeIteratorCore.Create(Mock.Of <ContainerInternal>(), null, continuation, null);
            FeedRangeEPK          defaultRange      = feedTokenIterator.FeedRangeInternal as FeedRangeEPK;

            Assert.AreEqual(FeedRangeEPK.ForCompleteRange().Range.Min, defaultRange.Range.Min);
            Assert.AreEqual(FeedRangeEPK.ForCompleteRange().Range.Max, defaultRange.Range.Max);
            Assert.IsNotNull(feedTokenIterator.FeedRangeContinuation);
            Assert.AreEqual(continuation, feedTokenIterator.FeedRangeContinuation.GetContinuation());
        }
Esempio n. 3
0
        public void ReadFeedIteratorCore_Create_WithFeedContinuation()
        {
            string       continuation = Guid.NewGuid().ToString();
            FeedRangeEPK feedRangeEPK = FeedRangeEPK.ForCompleteRange();
            FeedRangeCompositeContinuation feedRangeSimpleContinuation = new FeedRangeCompositeContinuation(Guid.NewGuid().ToString(), feedRangeEPK, new List <Documents.Routing.Range <string> >()
            {
                feedRangeEPK.Range
            }, continuation);
            FeedRangeIteratorCore feedTokenIterator = FeedRangeIteratorCore.Create(Mock.Of <ContainerInternal>(), null, feedRangeSimpleContinuation.ToString(), null);
            FeedRangeEPK          defaultRange      = feedTokenIterator.FeedRangeInternal as FeedRangeEPK;

            Assert.AreEqual(FeedRangeEPK.ForCompleteRange().Range.Min, defaultRange.Range.Min);
            Assert.AreEqual(FeedRangeEPK.ForCompleteRange().Range.Max, defaultRange.Range.Max);
            Assert.IsNotNull(feedTokenIterator.FeedRangeContinuation);
            Assert.AreEqual(continuation, feedTokenIterator.FeedRangeContinuation.GetContinuation());
        }