Package com.xebia.lottery.events

Examples of com.xebia.lottery.events.LotteryTicketPurchasedEvent


            notify(new ValidationError("insufficient account balance to purchase ticket"));
            return;
        }
       
        customer.deductBalance(this.ticketPrice);
        apply(new LotteryTicketPurchasedEvent(aggregate.getVersionedId(), customer.getVersionedId(), generateTicketNumber()));
    }
View Full Code Here


   
    @Test
    public void shouldRaiseTicketPurchasedEvent() {
        assertChange(
                lottery,
                new LotteryTicketPurchasedEvent(LOTTERY_ID, CUSTOMER_ID, "431130"));
    }
View Full Code Here

TOP

Related Classes of com.xebia.lottery.events.LotteryTicketPurchasedEvent

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.