public async Task GetCountryCodesTest() { List <string> expected = new List <string> { "test-countryCode1", "test-countryCode2" }; mockServer .Given( Request.Create() .WithPath("/trial/configuration/v1/countrycodes/Identity Verification") .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 <string> result = configurationApi.GetCountryCodes("trial", "Identity Verification"); Assert.Equal(result, expected); } catch (ApiException) { Assert.True(false, "Unexpected ApiException"); } try { List <string> result = await configurationApi.GetCountryCodesAsync("trial", "Identity Verification"); Assert.Equal(result, expected); } catch (ApiException) { Assert.True(false, "Unexpected ApiException"); } }