Examples of LotteryCreatedEvent


Examples of com.xebia.lottery.events.LotteryCreatedEvent

        super(id);
    }
   
    public Lottery(VersionedId id, LotteryInfo info) {
        super(id);
        apply(new LotteryCreatedEvent(id,  info));
    }
View Full Code Here

Examples of com.xebia.lottery.events.LotteryCreatedEvent

        subject = new Lottery(LOTTERY_ID, LOTTER_INFO);
    }
   
    @Test
    public void shouldRaiseLotteryCreatedEvent() {
        assertChange(subject, new LotteryCreatedEvent(LOTTERY_ID, LOTTER_INFO));
    }
View Full Code Here

Examples of com.xebia.lottery.events.LotteryCreatedEvent

   
    @Test
    public void findUpcomingLotteries() {
        assertTrue(lotteryQueryService.findUpcomingLotteries().isEmpty());
       
        lotteryCreatedEventHandler.handleMessage(new LotteryCreatedEvent(LOTTERY_ID, LOTTERY_INFO));
       
        List<LotteryInfoQueryResult> upcomingLotteries = lotteryQueryService.findUpcomingLotteries();
        assertEquals(1, upcomingLotteries.size());
        LotteryInfoQueryResult lottery = upcomingLotteries.get(0);
        assertEquals(new LotteryInfoQueryResult(LOTTERY_ID, LOTTERY_INFO), lottery);
View Full Code Here

Examples of com.xebia.lottery.events.LotteryCreatedEvent

        customer.loadFromHistory(asList(
                new CustomerCreatedEvent(CUSTOMER_ID, CUSTOMER_INFO),
                new CustomerBalanceChangedEvent(CUSTOMER_ID, 0, 50, 50)));
       
        lottery = new Lottery(LOTTERY_ID);
        lottery.loadFromHistory(asList(new LotteryCreatedEvent(LOTTERY_ID, LOTTER_INFO)));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.