public void WhenSearchForDeliveryResults_ThenReturnsMatchingResultsInOrder()
            {
                var datum1  = DateTime.UtcNow.ToNearestSecond();
                var datum2  = datum1.AddDays(1);
                var result1 = new SubscriptionDeliveryResultEntity
                {
                    Id = "aresultid1",
                    AttemptedDateUtc = datum1
                };
                var result2 = new SubscriptionDeliveryResultEntity
                {
                    Id = "aresultid2",
                    AttemptedDateUtc = datum2
                };

                deliveryResultStorage.Setup(drs => drs.Find(It.IsAny <TableStorageQuery>()))
                .Returns(new List <SubscriptionDeliveryResultEntity>
                {
                    result1,
                    result2
                });

                var results = store.Search("asubscriptionid", 1);

                Assert.That(results.Count, Is.EqualTo(1));
                Assert.That(results[0].Id, Is.EqualTo("aresultid2"));
            }
            public void WhenSearchForDeliveryResults_ThenReturnsMatchingResults()
            {
                var result = new SubscriptionDeliveryResultEntity
                {
                    Id = "aresultid"
                };

                deliveryResultStorage.Setup(drs => drs.Find(It.IsAny <TableStorageQuery>()))
                .Returns(new List <SubscriptionDeliveryResultEntity>
                {
                    result
                });

                var results = store.Search("asubscriptionid", 1);

                Assert.That(results.Count, Is.EqualTo(1));
                Assert.That(results[0].Id, Is.EqualTo("aresultid"));
            }