Package com.xebia.cqrs.bus

Examples of com.xebia.cqrs.bus.Response


            add(new TextField<Double>("ticketPrice").setRequired(true));
        }
       
        @Override
        protected void onSubmit() {
            Response response = bus.sendAndWaitForResponse(new CreateLotteryCommand(VersionedId.random(), new LotteryInfo(name, drawingTimestamp, prizeAmount, ticketPrice)));
            System.err.println("response: " + response);
            setResponsePage(LotteriesPage.class);
        }
View Full Code Here


                    new ChoiceRenderer<CustomerAccountQueryResult>("customerName")).setNullValid(false).setRequired(true));
        }
       
        @Override
        protected void onSubmit() {
            Response response = bus.sendAndWaitForResponse(new PurchaseTicketCommand(selectedLottery.getLotteryId(), selectedCustomer.getCustomerId()));
            for (ValidationError validationError : response.getRepliesOfType(ValidationError.class)) {
                error(validationError.getErrorMessage());
            }
            if (!hasError()) {
                setResponsePage(CustomerTicketsPage.class, CustomerTicketsPage.link(selectedCustomer.getCustomerId().getId()));
            }
View Full Code Here

       
        @Override
        protected void onSubmit() {
            Address address = new Address(streetName, houseNumber, postalCode, city, "Nederland");
            CustomerInfo info = new CustomerInfo(name, email, address);
            Response response = bus.sendAndWaitForResponse(new CreateCustomerCommand(VersionedId.random(), info, initialAccountBalance));
            System.err.println("response: " + response);
            for (ValidationError validationError : response.getRepliesOfType(ValidationError.class)) {
                error(validationError.getErrorMessage());
            }
            if (!hasError()) {
                setResponsePage(CustomersPage.class);
            }
View Full Code Here

*/
public class LotteriesPageTest extends LotteryPageTestCase {

    @Test
    public void testRenderMyPage() {
        expect(bus.sendAndWaitForResponse(isA(CreateLotteryCommand.class))).andReturn(new Response());
        replayMocks();
       
        // start and render the test page
        tester.startPage(LotteriesPage.class);

View Full Code Here

TOP

Related Classes of com.xebia.cqrs.bus.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.