Created
December 29, 2014 18:52
-
-
Save joebuschmann/c1d100d0f14718a10fe4 to your computer and use it in GitHub Desktop.
When building complex test data - not that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Given(@"the customer")] | |
| public void GivenTheCustomer(Table table) | |
| { | |
| Customer customer = table.CreateInstance<Customer>(); | |
| string[] addressParts = table.Rows[0]["Address"].Split(';'); | |
| Address address = new Address(); | |
| address.Line1 = addressParts[0]; | |
| address.Line2 = addressParts[1]; | |
| address.City = addressParts[2]; | |
| address.State = addressParts[3]; | |
| address.Zipcode = addressParts[4]; | |
| customer.Address = address; | |
| _customer = customer; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment