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.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; }
public void SetUp() { this.resource = new LabelReprintResource { ReprintType = "big", LabelTypeCode = "code", Links = new[] { new LinkResource("requested-by", "/employees/1234") } }; this.LabelService.CreateLabelReprint( Arg.Any <int>(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <int?>(), Arg.Any <int?>(), Arg.Any <string>(), Arg.Any <int>(), Arg.Is <string>(s => s == "big"), Arg.Any <string>()) .Returns(new LabelReprint { LabelReprintId = 808 }); this.result = this.Sut.Add(this.resource); }