Search in sources :

Example 1 with OfferServiceImpl

use of org.broadleafcommerce.core.offer.service.OfferServiceImpl 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);
}
Also used : FulfillmentGroupItemDao(org.broadleafcommerce.core.order.dao.FulfillmentGroupItemDao) OrderItemDao(org.broadleafcommerce.core.order.dao.OrderItemDao) CustomerOfferDao(org.broadleafcommerce.core.offer.dao.CustomerOfferDao) OrderMultishipOptionService(org.broadleafcommerce.core.order.service.OrderMultishipOptionService) FulfillmentGroupService(org.broadleafcommerce.core.order.service.FulfillmentGroupService) PromotableItemFactoryImpl(org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl) OfferServiceImpl(org.broadleafcommerce.core.offer.service.OfferServiceImpl) OrderItemService(org.broadleafcommerce.core.order.service.OrderItemService) OfferCodeDao(org.broadleafcommerce.core.offer.dao.OfferCodeDao) OfferDao(org.broadleafcommerce.core.offer.dao.OfferDao) CustomerOfferDao(org.broadleafcommerce.core.offer.dao.CustomerOfferDao) OrderService(org.broadleafcommerce.core.order.service.OrderService) OfferServiceUtilitiesImpl(org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl)

Example 2 with OfferServiceImpl

use of org.broadleafcommerce.core.offer.service.OfferServiceImpl 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);
}
Also used : FulfillmentGroupItemDao(org.broadleafcommerce.core.order.dao.FulfillmentGroupItemDao) OrderItemDao(org.broadleafcommerce.core.order.dao.OrderItemDao) CustomerOfferDao(org.broadleafcommerce.core.offer.dao.CustomerOfferDao) OrderMultishipOptionService(org.broadleafcommerce.core.order.service.OrderMultishipOptionService) FulfillmentGroupService(org.broadleafcommerce.core.order.service.FulfillmentGroupService) PromotableItemFactoryImpl(org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl) OfferServiceImpl(org.broadleafcommerce.core.offer.service.OfferServiceImpl) OrderItemService(org.broadleafcommerce.core.order.service.OrderItemService) OfferServiceUtilities(org.broadleafcommerce.core.offer.service.OfferServiceUtilities) OfferCodeDao(org.broadleafcommerce.core.offer.dao.OfferCodeDao) OrderService(org.broadleafcommerce.core.order.service.OrderService) OfferDao(org.broadleafcommerce.core.offer.dao.OfferDao) CustomerOfferDao(org.broadleafcommerce.core.offer.dao.CustomerOfferDao) OfferServiceUtilitiesImpl(org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl)

Aggregations

CustomerOfferDao (org.broadleafcommerce.core.offer.dao.CustomerOfferDao)2 OfferCodeDao (org.broadleafcommerce.core.offer.dao.OfferCodeDao)2 OfferDao (org.broadleafcommerce.core.offer.dao.OfferDao)2 OfferServiceImpl (org.broadleafcommerce.core.offer.service.OfferServiceImpl)2 OfferServiceUtilitiesImpl (org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl)2 PromotableItemFactoryImpl (org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl)2 FulfillmentGroupItemDao (org.broadleafcommerce.core.order.dao.FulfillmentGroupItemDao)2 OrderItemDao (org.broadleafcommerce.core.order.dao.OrderItemDao)2 FulfillmentGroupService (org.broadleafcommerce.core.order.service.FulfillmentGroupService)2 OrderItemService (org.broadleafcommerce.core.order.service.OrderItemService)2 OrderMultishipOptionService (org.broadleafcommerce.core.order.service.OrderMultishipOptionService)2 OrderService (org.broadleafcommerce.core.order.service.OrderService)2 OfferServiceUtilities (org.broadleafcommerce.core.offer.service.OfferServiceUtilities)1