Skip to content

Instantly share code, notes, and snippets.

@kaldas
Last active December 2, 2016 15:58
Show Gist options
  • Save kaldas/227b96dadf074b9ca42f62aa57462d52 to your computer and use it in GitHub Desktop.
Save kaldas/227b96dadf074b9ca42f62aa57462d52 to your computer and use it in GitHub Desktop.
[Test, TestCaseSource(typeof(OneNineTwoTestFactory), nameof(OneNineTwoTestFactory.CustomersThatCanBeVerified))]
public void given_an_idverification_request_that_should_return_positive(OneNineTwoRequest oneNineTwoRequest)
{
given_a_one_nine_two_request(oneNineTwoRequest);
when_an_id_verification_via_oneNineTwo_is_made();
then_it_should_successfully_verify_id();
}
public static IEnumerable CustomersThatCanBeVerified
{
get
{
foreach (var customer in Customers)
{
var country = GetCountry(customer.AddressAlpha2IsoCountryCode); //what is happening here?
var oneNineTwoRequest = new OneNineTwoRequest(customer, country, OneNineTwoServiceConfiguration); //and here?
yield return new TestCaseData(oneNineTwoRequest).
SetName("It_should_return_positive_for_"+ country.Alpha3IsoCountryCode + "_customer");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment