public SerialNumberFactory(
     ISernosPack sernosPack,
     IRepository <SalesArticle, string> salesArticleRepository)
 {
     this.sernosPack             = sernosPack;
     this.salesArticleRepository = salesArticleRepository;
 }
Example #2
0
 public PurchaseOrderDomainService(
     IQueryRepository <SernosIssued> sernosIssuedRepository,
     IQueryRepository <SernosBuilt> sernosBuiltRepository,
     ISernosPack sernosPack,
     IQueryRepository <PurchaseOrdersReceived> purchasedOrdersReceived)
 {
     this.sernosBuiltRepository   = sernosBuiltRepository;
     this.sernosIssuedRepository  = sernosIssuedRepository;
     this.purchasedOrdersReceived = purchasedOrdersReceived;
     this.sernosPack = sernosPack;
 }
Example #3
0
        public PurchaseOrdersModule(IPurchaseOrderService service, ISernosPack sernosPack)
        {
            this.service    = service;
            this.sernosPack = sernosPack;

            this.Get("/production/resources/purchase-orders", _ => this.GetPurchaseOrders());
            this.Post("/production/resources/purchase-orders/issue-sernos", _ => this.IssueSernos());
            this.Post("/production/resources/purchase-orders/build-sernos", _ => this.BuildSernos());
            this.Get("/production/resources/purchase-orders/{id}", parameters => this.GetPurchaseOrder(parameters.id));
            this.Put("/production/resources/purchase-orders/{id}", parameters => this.UpdatePurchaseOrder(parameters.id));
        }
Example #4
0
 public void SetUpContext()
 {
     this.SernosPack = Substitute.For <ISernosPack>();
     this.PurchaseOrderRepository          = Substitute.For <IRepository <PurchaseOrder, int> >();
     this.SernosIssuedRepository           = Substitute.For <IQueryRepository <SernosIssued> >();
     this.SernosBuiltRepository            = Substitute.For <IQueryRepository <SernosBuilt> >();
     this.PurchaseOrdersReceivedRepository = Substitute.For <IQueryRepository <PurchaseOrdersReceived> >();
     this.Sut = new PurchaseOrderDomainService(
         this.SernosIssuedRepository,
         this.SernosBuiltRepository,
         this.SernosPack,
         this.PurchaseOrdersReceivedRepository);
 }
Example #5
0
 public LabelService(
     IBartenderLabelPack bartenderLabelPack,
     ILabelPack labelPack,
     IRepository <ProductData, int> productDataRepository,
     IRepository <SerialNumber, int> serialNumberRepository,
     ISernosPack sernosPack,
     IRepository <LabelType, string> labelTypeRepository)
 {
     this.labelPack              = labelPack;
     this.bartenderLabelPack     = bartenderLabelPack;
     this.productDataRepository  = productDataRepository;
     this.serialNumberRepository = serialNumberRepository;
     this.sernosPack             = sernosPack;
     this.labelTypeRepository    = labelTypeRepository;
 }
Example #6
0
        public void EstablishContext()
        {
            this.FacadeService = Substitute.For <IPurchaseOrderService>();
            this.SernosPack    = Substitute.For <ISernosPack>();

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
            {
                with.Dependency(this.FacadeService);
                with.Dependency <IResourceBuilder <PurchaseOrder> >(
                    new PurchaseOrderResourceBuilder());
                with.Dependency <IResourceBuilder <IEnumerable <PurchaseOrder> > >(
                    new PurchaseOrdersResourceBuilder());
                with.Dependency <IResourceBuilder <PurchaseOrderWithSernosInfo> >(
                    new PurchaseOrderWithSernosInfoResourceBuilder());
                with.Dependency <IResourceBuilder <PurchaseOrderDetail> >(
                    new PurchaseOrderDetailResourceBuilder());
                with.Dependency <ISernosPack>(this.SernosPack);
                with.Module <PurchaseOrdersModule>();
                with.Dependency <IResourceBuilder <Error> >(new ErrorResourceBuilder());

                with.ResponseProcessor <PurchaseOrderResponseProcessor>();
                with.ResponseProcessor <PurchaseOrdersResponseProcessor>();
                with.ResponseProcessor <PurchaseOrderWithSernosInfoResponseProcessor>();
                with.ResponseProcessor <ErrorResponseProcessor>();

                with.RequestStartup(
                    (container, pipelines, context) =>
                {
                    var claims = new List <Claim>
                    {
                        new Claim(ClaimTypes.Role, "employee"),
                        new Claim("employee", "employees/1"),
                        new Claim(ClaimTypes.NameIdentifier, "test-user")
                    };

                    var user = new ClaimsIdentity(claims, "jwt");

                    context.CurrentUser = new ClaimsPrincipal(user);
                });
            });

            this.Browser = new Browser(bootstrapper);
        }
Example #7
0
 public WorksOrderUtilities(
     IRepository <Part, string> partsRepository,
     IRepository <PcasBoardForAudit, string> pcasBoardsForAuditRepository,
     IRepository <PcasRevision, string> pcasRevisionsRepository,
     IRepository <ProductionTriggerLevel, string> productionTriggerLevelsRepository,
     ISernosPack sernosPack,
     IRepository <Cit, string> citRepository,
     IRepository <Department, string> departmentRepository,
     ISalesArticleService salesArticleService,
     IRepository <WorksOrderLabel, WorksOrderLabelKey> labelService)
 {
     this.partsRepository = partsRepository;
     this.pcasBoardsForAuditRepository      = pcasBoardsForAuditRepository;
     this.pcasRevisionsRepository           = pcasRevisionsRepository;
     this.productionTriggerLevelsRepository = productionTriggerLevelsRepository;
     this.sernosPack           = sernosPack;
     this.citRepository        = citRepository;
     this.departmentRepository = departmentRepository;
     this.salesArticleService  = salesArticleService;
     this.labelService         = labelService;
 }
Example #8
0
 public void SetUpContext()
 {
     this.SalesArticleRepository = Substitute.For <IRepository <SalesArticle, string> >();
     this.SernosPack             = Substitute.For <ISernosPack>();
     this.Sut = new SerialNumberFactory(this.SernosPack, this.SalesArticleRepository);
 }
 public SalesArticleSerialNumberFacadeService(IRepository <SalesArticle, string> salesArticleRepository, ISernosPack sernosPack)
 {
     this.salesArticleRepository = salesArticleRepository;
     this.sernosPack             = sernosPack;
 }