|
6 | 6 | import io.eventuate.common.json.mapper.JSonMapper;
|
7 | 7 | import net.chrisrichardson.ftgo.apis.model.consumerservice.CreateConsumerRequest;
|
8 | 8 | import net.chrisrichardson.ftgo.apis.model.consumerservice.PersonName;
|
| 9 | +import net.chrisrichardson.ftgo.apis.model.restaurantservice.CreateRestaurantRequest; |
| 10 | +import net.chrisrichardson.ftgo.apis.model.restaurantservice.MenuItem; |
| 11 | +import net.chrisrichardson.ftgo.apis.model.restaurantservice.RestaurantMenu; |
9 | 12 | import net.chrisrichardson.ftgo.common.Address;
|
10 | 13 | import net.chrisrichardson.ftgo.common.CommonJsonMapperInitializer;
|
11 | 14 | import net.chrisrichardson.ftgo.common.Money;
|
|
14 | 17 | import net.chrisrichardson.ftgo.orderservice.api.events.OrderState;
|
15 | 18 | import net.chrisrichardson.ftgo.orderservice.api.web.CreateOrderRequest;
|
16 | 19 | import net.chrisrichardson.ftgo.orderservice.api.web.ReviseOrderRequest;
|
17 |
| -import net.chrisrichardson.ftgo.restaurantservice.events.CreateRestaurantRequest; |
18 |
| -import net.chrisrichardson.ftgo.restaurantservice.events.MenuItem; |
19 |
| -import net.chrisrichardson.ftgo.restaurantservice.events.RestaurantMenu; |
20 | 20 | import io.eventuate.util.test.async.Eventually;
|
21 | 21 | import org.junit.BeforeClass;
|
22 | 22 | import org.junit.Test;
|
@@ -263,11 +263,17 @@ private void verifyAccountCreatedForConsumer(int consumerId) {
|
263 | 263 | }
|
264 | 264 |
|
265 | 265 | private int createRestaurant() {
|
| 266 | + CreateRestaurantRequest request = new CreateRestaurantRequest().name(RESTAURANT_NAME) |
| 267 | + .address(new net.chrisrichardson.ftgo.apis.model.restaurantservice.Address() |
| 268 | + .street1("1 Main Street").street2("Unit 99").city("Oakland").state("CA").zip("94611")) |
| 269 | + .menu( |
| 270 | + new RestaurantMenu().addMenuItemsItem( |
| 271 | + new MenuItem().id(CHICKED_VINDALOO_MENU_ITEM_ID) |
| 272 | + .name("Chicken Vindaloo") |
| 273 | + .price(priceOfChickenVindaloo.asString()))); |
266 | 274 | Integer restaurantId =
|
267 | 275 | given().
|
268 |
| - body(new CreateRestaurantRequest(RESTAURANT_NAME, |
269 |
| - new Address("1 Main Street", "Unit 99", "Oakland", "CA", "94611"), |
270 |
| - new RestaurantMenu(Collections.singletonList(new MenuItem(CHICKED_VINDALOO_MENU_ITEM_ID, "Chicken Vindaloo", priceOfChickenVindaloo))))). |
| 276 | + body(request). |
271 | 277 | contentType("application/json").
|
272 | 278 | when().
|
273 | 279 | post(restaurantBaseUrl()).
|
|
0 commit comments