Skip to content
Snippets Groups Projects
Commit d021512b authored by michael.ramusi's avatar michael.ramusi
Browse files

order with non-existing products

parent f4ba8954
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,19 @@ public class http { ...@@ -36,6 +36,19 @@ public class http {
return o; return o;
} }
@RequestMapping("/orderNotExistingProducts")
public Order orderNotExistingProducts() {
int idAccount = 1;
int idOrder = 5;
Order o = new Order(idOrder, idAccount);
o.addProduct(1, 4);
o.addProduct(999, 4);
Event oc = new EventOrderCreated(o.id(), "hello", idAccount, o.getProducts());
http.orderService.send(oc);
return o;
}
@RequestMapping("/createAccount") @RequestMapping("/createAccount")
public String createAccount(@RequestParam(value = "name", defaultValue = "Orphée") String name) { public String createAccount(@RequestParam(value = "name", defaultValue = "Orphée") String name) {
accountService.send(new EventCreateAccount(1, "Creating the account", name)); accountService.send(new EventCreateAccount(1, "Creating the account", name));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment