Ejemplo n.º 1
0
        public void FetchAccountBalanceAsync_should_retrieve_the_account_balances_of_an_user()
        {
            // Arrange
            var sut = new PlaidClient(Environment.Sandbox);

            // Act
            var request = new Balance.GetBalanceRequest().UseDefaults();
            var result  = sut.FetchAccountBalanceAsync(request).Result;

            // Assert
            result.RequestId.ShouldNotBeNullOrEmpty();
            result.Accounts.Length.ShouldBeGreaterThanOrEqualTo(1);
            result.Accounts[0].Balance.Current.ShouldBeGreaterThanOrEqualTo(1);
        }
Ejemplo n.º 2
0
        public async Task FetchAccountBalanceAsync_should_retrieve_the_account_balances_of_an_user()
        {
            // Arrange
            using PlaidClient client = new PlaidClient { Environment = Environment.Sandbox };

            // Act
            GetBalanceRequest request = new GetBalanceRequest {
            };
            GetBalanceResponse result = await client.FetchAccountBalanceAsync(request);

            // Assert
            result.Request.ShouldNotBeNullOrEmpty();
            result.Accounts.Length.ShouldBeGreaterThanOrEqualTo(1);
            result.Accounts[0].Balance.Current.ShouldBeGreaterThanOrEqualTo(1);
        }