public void Can_retrieve_institutions_by_name() { // Arrange var sut = new PlaidClient(Environment.Sandbox); // Act var request = new Institution.SearchRequest() { Query = "citi" }.UseDefaults(); var result = sut.FetchInstitutionsAsync(request).Result; // Assert result.IsSuccessStatusCode.ShouldBeTrue(); result.RequestId.ShouldNotBeNullOrEmpty(); result.Institutions.Length.ShouldBeGreaterThanOrEqualTo(1); result.Institutions.ShouldAllBe(i => i.Name.ToLower().Contains(request.Query.ToLower())); }
public void FetchInstitutionsAsync_should_retrieve_a_list_of_banks_that_matches_a_specified_query() { // Arrange var sut = new PlaidClient(Environment.Sandbox); // Act var request = new Institution.SearchRequest() { Query = "tartan" }.UseDefaults(); var result = sut.FetchInstitutionsAsync(request).Result; // Assert result.IsSuccessStatusCode.ShouldBeTrue(); result.RequestId.ShouldNotBeNullOrEmpty(); result.Institutions.Length.ShouldBeGreaterThanOrEqualTo(1); result.Institutions.ShouldAllBe(i => i.Name.ToLower().Contains(request.Query.ToLower())); }