use of org.broadleafcommerce.core.offer.dao.CustomerOfferDao in project BroadleafCommerce by BroadleafCommerce.
the class ItemOfferProcessorTest method setUp.
@Override
protected void setUp() throws Exception {
CustomerOfferDao customerOfferDaoMock = EasyMock.createMock(CustomerOfferDao.class);
OfferCodeDao offerCodeDaoMock = EasyMock.createMock(OfferCodeDao.class);
offerDaoMock = EasyMock.createMock(OfferDao.class);
orderItemDaoMock = EasyMock.createMock(OrderItemDao.class);
orderServiceMock = EasyMock.createMock(OrderService.class);
orderItemServiceMock = EasyMock.createMock(OrderItemService.class);
fgItemDaoMock = EasyMock.createMock(FulfillmentGroupItemDao.class);
fgServiceMock = EasyMock.createMock(FulfillmentGroupService.class);
multishipOptionServiceMock = EasyMock.createMock(OrderMultishipOptionService.class);
offerTimeZoneProcessorMock = EasyMock.createMock(OfferTimeZoneProcessor.class);
OfferServiceUtilitiesImpl offerServiceUtilities = new OfferServiceUtilitiesImpl();
offerServiceUtilities.setOfferDao(offerDaoMock);
offerServiceUtilities.setPromotableItemFactory(new PromotableItemFactoryImpl());
itemProcessor = new ItemOfferProcessorImpl();
itemProcessor.setOfferDao(offerDaoMock);
itemProcessor.setOrderItemDao(orderItemDaoMock);
itemProcessor.setOfferTimeZoneProcessor(offerTimeZoneProcessorMock);
itemProcessor.setPromotableItemFactory(new PromotableItemFactoryImpl());
itemProcessor.setOfferServiceUtilities(offerServiceUtilities);
offerService = new OfferServiceImpl();
OrderOfferProcessorImpl orderProcessor = new OrderOfferProcessorImpl();
orderProcessor.setOfferDao(offerDaoMock);
orderProcessor.setPromotableItemFactory(new PromotableItemFactoryImpl());
orderProcessor.setOfferTimeZoneProcessor(offerTimeZoneProcessorMock);
orderProcessor.setOrderItemDao(orderItemDaoMock);
orderProcessor.setOfferServiceUtilities(offerServiceUtilities);
offerService.setCustomerOfferDao(customerOfferDaoMock);
offerService.setOfferCodeDao(offerCodeDaoMock);
offerService.setOfferDao(offerDaoMock);
offerService.setOrderOfferProcessor(orderProcessor);
offerService.setItemOfferProcessor(itemProcessor);
offerService.setPromotableItemFactory(new PromotableItemFactoryImpl());
offerService.setOrderService(orderServiceMock);
}
use of org.broadleafcommerce.core.offer.dao.CustomerOfferDao in project BroadleafCommerce by BroadleafCommerce.
the class FulfillmentGroupOfferProcessorTest method setUp.
@Override
protected void setUp() throws Exception {
offerService = new OfferServiceImpl();
CustomerOfferDao customerOfferDaoMock = EasyMock.createMock(CustomerOfferDao.class);
OfferCodeDao offerCodeDaoMock = EasyMock.createMock(OfferCodeDao.class);
orderServiceMock = EasyMock.createMock(OrderService.class);
orderItemDaoMock = EasyMock.createMock(OrderItemDao.class);
orderItemServiceMock = EasyMock.createMock(OrderItemService.class);
fgItemDaoMock = EasyMock.createMock(FulfillmentGroupItemDao.class);
offerDaoMock = EasyMock.createMock(OfferDao.class);
fgServiceMock = EasyMock.createMock(FulfillmentGroupService.class);
multishipOptionServiceMock = EasyMock.createMock(OrderMultishipOptionService.class);
offerServiceUtilitiesMock = EasyMock.createMock(OfferServiceUtilities.class);
offerTimeZoneProcessorMock = EasyMock.createMock(OfferTimeZoneProcessor.class);
fgProcessor = new TestableFulfillmentGroupOfferProcessor();
fgProcessor.setOfferDao(offerDaoMock);
fgProcessor.setOrderItemDao(orderItemDaoMock);
fgProcessor.setPromotableItemFactory(new PromotableItemFactoryImpl());
fgProcessor.setOfferServiceUtilities(offerServiceUtilitiesMock);
OfferServiceUtilitiesImpl offerServiceUtilities = new OfferServiceUtilitiesImpl();
offerServiceUtilities.setOfferDao(offerDaoMock);
offerServiceUtilities.setPromotableItemFactory(new PromotableItemFactoryImpl());
OrderOfferProcessorImpl orderProcessor = new OrderOfferProcessorImpl();
orderProcessor.setOfferDao(offerDaoMock);
orderProcessor.setPromotableItemFactory(new PromotableItemFactoryImpl());
orderProcessor.setOfferServiceUtilities(offerServiceUtilitiesMock);
orderProcessor.setOfferTimeZoneProcessor(offerTimeZoneProcessorMock);
orderProcessor.setOrderItemDao(orderItemDaoMock);
orderProcessor.setOfferServiceUtilities(offerServiceUtilities);
ItemOfferProcessorImpl itemProcessor = new ItemOfferProcessorImpl();
itemProcessor.setOfferDao(offerDaoMock);
itemProcessor.setPromotableItemFactory(new PromotableItemFactoryImpl());
itemProcessor.setOrderItemDao(orderItemDaoMock);
itemProcessor.setOfferServiceUtilities(offerServiceUtilities);
offerService.setCustomerOfferDao(customerOfferDaoMock);
offerService.setOfferCodeDao(offerCodeDaoMock);
offerService.setOfferDao(offerDaoMock);
offerService.setOrderOfferProcessor(orderProcessor);
offerService.setItemOfferProcessor(itemProcessor);
offerService.setFulfillmentGroupOfferProcessor(fgProcessor);
offerService.setPromotableItemFactory(new PromotableItemFactoryImpl());
offerService.setOrderService(orderServiceMock);
}
Aggregations