Created
December 29, 2014 18:56
-
-
Save joebuschmann/a238cb7fcd234eb5432b to your computer and use it in GitHub Desktop.
When sharing state between bindings - code this
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
| private Customer _customer; | |
| private Response _response; | |
| [Given(@"the new customer")] | |
| public void GivenTheNewCustomer(Table table) | |
| { | |
| _customer = table.CreateInstance<Customer>(); | |
| } | |
| [Given(@"the customer's address")] | |
| public void GivenTheCustomerAddress(Table table) | |
| { | |
| _customer.Address = table.CreateInstance<Address>(); | |
| } | |
| [When(@"I save the customer")] | |
| public void WhenISaveTheCustomer() | |
| { | |
| _response = _serviceProxy.Post(_customer); | |
| } | |
| [Then(@"a successful response should be returned")] | |
| public void ThenASuccessfulResponseShouldBeReturned() | |
| { | |
| Assert.That(_response.IsSuccessful, Is.True); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment