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()) | |
.Build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment