Пример #1
0
 public static ConsignmentItemService Create(IConsignmentItemRepository consignmentItemRepository, IUserContext userContext)
 {
     return(new ConsignmentItemService(
                userContext,
                MockRepository.GenerateStub <IConsignmentRepository>(),
                consignmentItemRepository,
                MockRepository.GenerateStub <IJobItemRepository>(),
                MockRepository.GenerateStub <IListItemRepository>(),
                MockRepository.GenerateStub <ISupplierRepository>(),
                MockRepository.GenerateStub <IQueueDispatcher <IMessage> >()));
 }
Пример #2
0
 public static ConsignmentItemService CreateForEditForPendingItems(IConsignmentItemRepository consignmentItemRepository, Guid jobItemId, Guid supplierId, IUserContext userContext, bool jobIsPending = false)
 {
     return(new ConsignmentItemService(
                userContext,
                MockRepository.GenerateStub <IConsignmentRepository>(),
                consignmentItemRepository,
                GetJobItemRepository(jobItemId, userContext, jobIsPending),
                MockRepository.GenerateStub <IListItemRepository>(),
                GetSupplierRepository(supplierId),
                MockRepository.GenerateStub <IQueueDispatcher <IMessage> >()));
 }
Пример #3
0
 public static ConsignmentItemService Create(
     IConsignmentItemRepository consignmentItemRepository, IJobItemRepository jobItemRepository, Guid consignmentId, IUserContext userContext, int itemCount = 0)
 {
     return(new ConsignmentItemService(
                userContext,
                GetConsignmentRepository(consignmentId, itemCount),
                consignmentItemRepository,
                jobItemRepository,
                GetListItemRepository(),
                MockRepository.GenerateMock <ISupplierRepository>(),
                MockRepository.GenerateMock <IQueueDispatcher <IMessage> >()));
 }
Пример #4
0
 public ConsignmentItemService(
     IUserContext applicationContext,
     IConsignmentRepository consignmentRepository,
     IConsignmentItemRepository consignmentItemRepository,
     IJobItemRepository jobItemRepository,
     IListItemRepository listItemRepository,
     ISupplierRepository supplierRepository,
     IQueueDispatcher <IMessage> dispatcher) : base(applicationContext, dispatcher)
 {
     _consignmentRepository     = consignmentRepository;
     _consignmentItemRepository = consignmentItemRepository;
     _jobItemRepository         = jobItemRepository;
     _listItemRepository        = listItemRepository;
     _supplierRepository        = supplierRepository;
 }