Created
December 29, 2014 18:44
-
-
Save joebuschmann/b3ae7a70286fee811103 to your computer and use it in GitHub Desktop.
When working with tables - 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 following address")] | |
| public void GivenTheFollowingAddress(Table table) | |
| { | |
| Address address = new Address(); | |
| address.Line1 = table.Rows[0]["Line 1"]; | |
| address.Line2 = table.Rows[0]["Line 2"]; | |
| address.City = table.Rows[0]["City"]; | |
| address.State = table.Rows[0]["State"]; | |
| address.Zipcode = table.Rows[0]["Zipcode"]; | |
| } | |
| [Then(@"the following address should be returned by the service")] | |
| public void ThenTheFollowingAddressShouldBeReturnedByTheService(Table table) | |
| { | |
| Assert.AreEqual(table.Rows[0]["Line 1"], _address.Line1); | |
| Assert.AreEqual(table.Rows[0]["Line 2"], _address.Line2); | |
| Assert.AreEqual(table.Rows[0]["City"], _address.City); | |
| Assert.AreEqual(table.Rows[0]["State"], _address.State); | |
| Assert.AreEqual(table.Rows[0]["Zipcode"], _address.Zipcode); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment