예제 #1
0
        public async Task ItShouldReturnAllSubscriberIdsWithSnapshots()
        {
            await this.DatabaseTestAsync(async testDatabase =>
            {
                this.target = new GetAllSubscribersDbStatement(testDatabase);

                var userIds = await this.CreateDataAsync(testDatabase, 100);
                await testDatabase.TakeSnapshotAsync();

                var result = await this.target.ExecuteAsync();

                Assert.AreEqual(100 + TestDatabaseSeed.SubscriberChannelSnapshots, result.Count);

                foreach (var item in userIds)
                {
                    Assert.IsTrue(result.Contains(item));
                }

                return(ExpectedSideEffects.None);
            });
        }
예제 #2
0
 public void Test()
 {
     this.target = new GetAllSubscribersDbStatement(new Mock <IFifthweekDbConnectionFactory>(MockBehavior.Strict).Object);
 }