public void SetUp() { var l = new WorksOrderLabel { Sequence = 1, PartNumber = "PART", LabelText = "text" }; this.requestResource = new WorksOrderLabelResource { Sequence = 1, PartNumber = "PART", LabelText = "new text" }; this.LabelService.Update(Arg.Any <WorksOrderLabelKey>(), Arg.Any <WorksOrderLabelResource>()).Returns(new SuccessResult <WorksOrderLabel>(l)); this.Response = this.Browser.Put( "/production/works-orders/labels/1/PART", with => { with.Header("Accept", "application/json"); with.JsonBody(this.requestResource); }).Result; }
public void SetUp() { var requestResource = new WorksOrderLabelResource { PartNumber = "PART", Sequence = 1, }; var label = new WorksOrderLabel { PartNumber = "PART", Sequence = 1, }; this.LabelService.Add(Arg.Any <WorksOrderLabelResource>()) .Returns(new CreatedResult <WorksOrderLabel>(label)); this.Response = this.Browser.Post( "/production/works-orders/labels", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(requestResource); }).Result; }