Created
August 24, 2017 07:51
-
-
Save CoditCompany/44f3a7d413d0f8258174a721d0df2cea to your computer and use it in GitHub Desktop.
PipeTo Example
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
| [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