Beispiel #1
0
        public void Authenticator_InvalidCredentials_Exception()
        {
            var target = new BuxferClient("*****@*****.**", "dohdoh");

            ExceptionAssert.IsThrowing(new BuxferException("Email or username does not match an existing account."), () =>
            {
                target.GetTransactions();
            });
        }
        private static async Task <T> Load <T>(BuxferClient target, int id, string tag)
        {
            var loadedTransactions = await target.GetTransactions(f => f.TagName = tag);

            var loadedTransaction = loadedTransactions.Entities.Should()
                                    .Contain(t => t.Id == id).Subject;

            return(loadedTransaction.Should().BeOfType <T>().Subject);
        }
Beispiel #3
0
        public void Authenticator_InvalidCredentials_Exception()
        {
            var logger = LoggerFactory.Create(c => c.AddConsole()).CreateLogger <AuthTest>();
            var target = new BuxferClient("*****@*****.**", "bk", logger);

            Assert.ThrowsAsync(Is.TypeOf <BuxferException>()
                               .And.Message.Contain("Email or username does not match an existing account."),
                               async() => { await target.GetTransactions(); });
        }