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);
        }
        public async Task Must_Have_An_Account()
        {
            var source = new InMemoryGatewayAccountSource <TestableGatewayAccount>(new[]
            {
                new TestableGatewayAccount()
            });

            var provider = new GatewayAccountProvider <TestableGatewayAccount>(new[] { source });

            var accounts = await provider.LoadAccountsAsync();

            Assert.IsNotNull(accounts);
            Assert.IsTrue(accounts.Count == 1);
        }
Exemple #3
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);
        }