Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Imposter for orders endpoint which responds based on a condition.
public class OrdersImposter: IImposter
public Imposter Build()
return new ImposterDefinition("OrdersStub")
.DeclareResource("/api/Orders", HttpMethod.Post)
.When(r => r.Content.Contains("Product:1234"))
.Then(new OrdersResponseCreator())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment