public void SetUp()
        {
            var cit = new Cit {
                Code = "A", Name = "Army of the Undead"
            };

            this.CitRepository.FindById(Arg.Any <string>()).Returns(cit);

            var master = new PtlMaster {
                LastFullRunJobref = "CJCAIH", LastFullRunDateTime = new DateTime(2019, 1, 1)
            };

            this.PtlMasterRepository.GetRecord().Returns(master);

            var triggers = new List <ProductionTrigger>
            {
                new ProductionTrigger {
                    PartNumber = "A", Description = "A product", Priority = "1"
                },
                new ProductionTrigger {
                    PartNumber = "B", Description = "B nice", Priority = "2"
                },
                new ProductionTrigger {
                    PartNumber = "C", Description = "C", Priority = "3"
                }
            };

            this.ProductionTriggerQueryRepository.FilterBy(Arg.Any <Expression <Func <ProductionTrigger, bool> > >())
            .Returns(triggers.AsQueryable());

            this.result = this.Sut.GetProductionTriggerReport("CJCAIH", "A");
        }
 public void SetUp()
 {
     this.progressMessage = string.Empty;
     this.ptlMaster       = new PtlMaster
     {
         LastFullJobRef          = "G",
         LastFullRunDate         = 1.December(2022).AddHours(1),
         LastFullRunMinutesTaken = 5
     };
     this.PtlRepository.GetRecord()
     .Returns(this.ptlMaster);
     this.WorkstationPack.TopUpRunProgressStatus()
     .Returns(this.progressMessage);
     this.topUpList = new List <TopUpListJobRef>
     {
         new TopUpListJobRef {
             JobRef = "F", DateRun = 1.December(2022).AddHours(1)
         },
         new TopUpListJobRef {
             JobRef = "G", DateRun = 1.December(2022).AddHours(1)
         }
     };
     this.TopUpListJobRefRepository.FindAll().Returns(this.topUpList.AsQueryable());
     this.result = this.Sut.CanStartNewRun();
 }
Beispiel #3
0
        public void SetUp()
        {
            this.ptlMaster = new PtlMaster
            {
                LastFullJobRef          = "G",
                LastFullRunDate         = 1.December(2022).AddHours(1),
                LastFullRunMinutesTaken = 5
            };
            this.PtlRepository.GetRecord()
            .Returns(this.ptlMaster);
            this.topUpList = new List <TopUpListJobRef>
            {
                new TopUpListJobRef {
                    JobRef = "F", DateRun = 1.December(2022).AddHours(1)
                }
            };
            this.TopUpListJobRefRepository.FindAll().Returns(this.topUpList.AsQueryable());

            this.result = this.Sut.StartTopUpRun();
        }