Esempio n. 1
0
        public async Task CanDeserializeLogsDetailResponse()
        {
            var client = new iBanFirstClient(new HttpClient(new FakeHttpMessageHandler <Log>()));
            var tx     = await client.Logs.Get("account-id");

            Assert.NotNull(tx);
            Assert.IsType <Log>(tx.Result);
        }
Esempio n. 2
0
        public async Task CanDeserializeTradesListResponse()
        {
            var client = new iBanFirstClient(new HttpClient(new FakeHttpMessageHandler <List <Trade> >()));
            var tx     = await client.Trades.List(TransactionStatus.all);

            Assert.NotNull(tx);
            Assert.IsType <List <Trade> >(tx.Result);
        }
Esempio n. 3
0
        public async Task CanDeserializeLogsListResponse()
        {
            var client = new iBanFirstClient(new HttpClient(new FakeHttpMessageHandler <List <Log> >()));
            var tx     = await client.Logs.List();

            Assert.NotNull(tx);
            Assert.IsType <List <Log> >(tx.Result);
        }
Esempio n. 4
0
        public async Task CanDeserializeWalletDetailResponse()
        {
            var client = new iBanFirstClient(new HttpClient(new FakeHttpMessageHandler <WalletDetail>()));
            var tx     = await client.Wallets.Get("wallet-id");

            Assert.NotNull(tx);
            Assert.IsType <WalletDetail>(tx.Result);
        }
Esempio n. 5
0
        public async Task CanDeserializeFinancialMovementsResponse()
        {
            var client = new iBanFirstClient(new HttpClient(new FakeHttpMessageHandler <List <FinancialMovementList> >()));
            var tx     = await client.FinancialMovements.List();

            Assert.NotNull(tx);
            Assert.IsType <List <FinancialMovementList> >(tx.Result);
        }
Esempio n. 6
0
        public async Task CanDeserializeExternalBankAccountListResponse()
        {
            var client = new iBanFirstClient(new HttpClient(new FakeHttpMessageHandler <List <ExternalBankAccount> >()));
            var tx     = await client.ExternalBankAccounts.List();

            Assert.NotNull(tx);
            Assert.IsType <List <ExternalBankAccount> >(tx.Result);
        }
Esempio n. 7
0
        public async Task CanMakeTwoRequestsFromSameClientInstance()
        {
            var client = new iBanFirstClient(new HttpClient(new FakeHttpMessageHandler <WalletDetail>()));
            var tx     = await client.Wallets.Get("wallet-id");

            Assert.NotNull(tx);
            Assert.IsType <WalletDetail>(tx.Result);

            var tx2 = await client.Wallets.Get("wallet-id");

            Assert.NotNull(tx2);
            Assert.IsType <WalletDetail>(tx2.Result);
        }
Esempio n. 8
0
        public void CanInstantiateClient()
        {
            var client = new iBanFirstClient(new HttpClient());

            Assert.NotNull(client);
        }