public void SetUp() { this.resource = new SaCoreTypeResource { CoreType = 1, Description = "Desc", DateInvalid = 28.March(2019).ToString("o") }; this.result = this.Sut.Add(this.resource); }
public void SetUp() { this.resource = new SaCoreTypeResource { CoreType = 1, Description = "Desc", DateInvalid = null }; this.result = this.Sut.Add(this.resource); }
public void SetUp() { this.resource = new SaCoreTypeResource { CoreType = 1, Description = "new desc", DateInvalid = 28.March(1995).ToString("o"), SortOrder = 2, LookAheadDays = 10, TriggerLevel = 1 }; this.SaCoreTypeRepository.FindById(1) .Returns(new SaCoreType(1, "desc")); this.result = this.Sut.Update(1, this.resource); }
public void SetUp() { this.requestResource = new SaCoreTypeResource { Description = "new description" }; var saCoreType = new SaCoreType(1, "description"); this.SaCoreTypeService.Add(Arg.Any <SaCoreTypeResource>()) .Returns(new SuccessResult <SaCoreType>(saCoreType)); this.Response = this.Browser.Post( "/products/maint/sa-core-types", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }