public void SetUp() { this.SernosPack.When(a => a.GetSerialNumberBoxes("PART 1", out this.noOfSerialNumbers, out this.noOfBoxes)) .Do(a => { a[1] = 2; a[2] = 1; }); this.LabelPack.GetLabelData("BOX", 808807, "PART 1").Returns("data to be printed 1"); this.LabelTypeRepository.FindById("BOX") .Returns(new LabelType { DefaultPrinter = "printer 1", Filename = "file 1" }); this.SernosPack.SerialNumberExists(808807, "PART 1").Returns(true); this.result = this.Sut.CreateLabelReprint( 101202, "A good reason", "part 1", 808807, 45, "BOX", 1, "REPRINT", null); }
public void SetUp() { var labelReprint = new LabelReprint { LabelReprintId = 2, LabelTypeCode = "BOX", DocumentType = "W", NewPartNumber = "N", PartNumber = "P", WorksOrderNumber = 3, Reason = "Good", NumberOfProducts = 2, SerialNumber = 3, RequestedBy = 3423, DateIssued = 1.February(2021), ReprintType = "RSN REISSUE" }; this.LabelReprintFacadeService.GetById(2, Arg.Any <IEnumerable <string> >()) .Returns(new SuccessResult <ResponseModel <LabelReprint> >(new ResponseModel <LabelReprint>(labelReprint, new List <string>()))); this.Response = this.Browser.Get( "/production/maintenance/labels/reprint-reasons/2", with => { with.Header("Accept", "application/json"); }).Result; }
public void SetUp() { this.requestResource = new LabelReprintResource { LabelReprintId = 2 }; var labelReprint = new LabelReprint { LabelReprintId = 2, LabelTypeCode = "BOX", DocumentType = "W", NewPartNumber = "N", PartNumber = "P", WorksOrderNumber = 3, Reason = "Good", NumberOfProducts = 2, SerialNumber = 3, RequestedBy = 3423, DateIssued = 1.February(2021), ReprintType = "RSN REISSUE" }; this.LabelReprintFacadeService.Add(Arg.Any <LabelReprintResource>(), Arg.Any <IEnumerable <string> >()) .Returns(new CreatedResult <ResponseModel <LabelReprint> >(new ResponseModel <LabelReprint>(labelReprint, new List <string>()))); this.AuthorisationService.HasPermissionFor(AuthorisedAction.SerialNumberReissueRebuild, Arg.Any <IEnumerable <string> >()) .Returns(false); this.Response = this.Browser.Post( "/production/maintenance/labels/reprint-reasons", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }