Created
September 5, 2018 06:22
-
-
Save tonfever/dc9913295c345300659e01f1bebebdf8 to your computer and use it in GitHub Desktop.
Sample Scenario for Citrus Simulator
This file contains 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
@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