Ejemplo n.º 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();
            });
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 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(); });
        }