use of com.iluwatar.hexagonal.module.LotteryTestingModule in project java-design-patterns by iluwatar.
the class App method main.
/**
* Program entry point
*/
public static void main(String[] args) {
Injector injector = Guice.createInjector(new LotteryTestingModule());
// start new lottery round
LotteryAdministration administartion = injector.getInstance(LotteryAdministration.class);
administartion.resetLottery();
// submit some lottery tickets
LotteryService service = injector.getInstance(LotteryService.class);
SampleData.submitTickets(service, 20);
// perform lottery
administartion.performLottery();
}
Aggregations