Skip to content

Instantly share code, notes, and snippets.

@CoditCompany
Created August 24, 2017 07:51
Show Gist options
  • Select an option

  • Save CoditCompany/44f3a7d413d0f8258174a721d0df2cea to your computer and use it in GitHub Desktop.

Select an option

Save CoditCompany/44f3a7d413d0f8258174a721d0df2cea to your computer and use it in GitHub Desktop.
PipeTo Example
[Property]
public Property Response_With_404_Not_Found_If_Request_Contains_UnknownId(
string unknownId,
string existingId)
{
// Arrange
return new Message(unknownId)
.WithMethod(HttpMethod.Post)
// Act
.PipeTo(ExerciseSendMessageWithKnownId(existingId))
// Assert
.PipeTo(response => HttpStatusCode.NotFound == response.StatusCode)
.PipeTo(isNotFound => isNotFound.When(existingId != unknownId));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment