public async Task GetDetailedConsentsTest() { List <Consent> expected = new List <Consent> { new Consent(name: "test-name", text: "test-text") }; mockServer .Given( Request.Create() .WithPath("/trial/configuration/v1/detailedConsents/Identity Verification/US") .WithHeader("x-trulioo-api-key", TEST_API_KEY) .UsingGet() ) .RespondWith( Response.Create() .WithStatusCode(200) .WithHeader("Content-Type", "application/json") .WithBody(JsonConvert.SerializeObject(expected)) ); try { List <Consent> result = configurationApi.GetDetailedConsents("trial", "Identity Verification", "US"); Assert.Equal(result, expected); } catch (ApiException) { Assert.True(false, "Unexpected ApiException"); } try { List <Consent> result = await configurationApi.GetDetailedConsentsAsync("trial", "Identity Verification", "US"); Assert.Equal(result, expected); } catch (ApiException) { Assert.True(false, "Unexpected ApiException"); } }