Exemple #1
0
        public async Task Must_Have_An_Account()
        {
            IGatewayAccountSource <TestableGatewayAccount> source = new InMemoryGatewayAccountSource <TestableGatewayAccount>(new[]
            {
                new TestableGatewayAccount()
            });

            var accounts = new GatewayAccountCollection <TestableGatewayAccount>();

            await source.AddAccountsAsync(accounts);

            Assert.IsTrue(accounts.Count == 1);
        }
Exemple #2
0
        public async Task Must_Have_The_Expected_Account()
        {
            const int expectedId = 1;

            IGatewayAccountSource <TestableGatewayAccount> source = new InMemoryGatewayAccountSource <TestableGatewayAccount>(new[]
            {
                new TestableGatewayAccount {
                    Id = expectedId
                }
            });

            var accounts = new GatewayAccountCollection <TestableGatewayAccount>();

            await source.AddAccountsAsync(accounts);

            Assert.AreEqual(expectedId, accounts.First().Id);
        }