Skip to content

Instantly share code, notes, and snippets.

@tonfever
Created September 5, 2018 06:22
Show Gist options
  • Save tonfever/dc9913295c345300659e01f1bebebdf8 to your computer and use it in GitHub Desktop.
Save tonfever/dc9913295c345300659e01f1bebebdf8 to your computer and use it in GitHub Desktop.
Sample Scenario for Citrus Simulator
@Scenario("CreateNewOrder")
@RequestMapping(value = "/services/rest/v1/order", method = RequestMethod.POST)
public class CreateNewOrderScenario extends AbstractSimulatorScenario {
@Override
public void run(ScenarioRunner scenario) {
scenario
.http()
.receive(httpServerReceiveActionBuilder -> {
httpServerReceiveActionBuilder.post();
});
scenario
.http()
.send((builder -> builder
.response(HttpStatus.OK)
.payload("New Order has been created..."))
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment