Exemplo n.º 1
0
        public void ShouldHandleDelete()
        {
            Etag first = Etag.Empty.IncrementBy(1);

            prefetchingBehavior.AfterStorageCommitBeforeWorkNotifications(new[]
            {
                new JsonDocument
                {
                    Etag = first,
                    Key  = "1"
                },
            });

            Etag second = Etag.Empty.IncrementBy(2);

            prefetchingBehavior.AfterStorageCommitBeforeWorkNotifications(new[]
            {
                new JsonDocument
                {
                    Etag = second,
                    Key  = "2"
                },
            });

            prefetchingBehavior.AfterDelete("1", first);

            Assert.Equal(1, prefetchingBehavior.GetDocumentsBatchFrom(Etag.Empty).Count(x => prefetchingBehavior.FilterDocuments(x)));
        }