public void SetUp() { this.ptlSettings = new PtlSettings { BuildToMonthEndFromDays = 1 }; this.AuthorisationService.HasPermissionFor(AuthorisedAction.StartTriggerRun, Arg.Any <List <string> >()) .Returns(true); this.result = this.Sut.Build(new ResponseModel <PtlSettings>(this.ptlSettings, new List <string>())); }
public void SetUp() { this.settings = new PtlSettings(); this.resource = new PtlSettingsResource { BuildToMonthEndFromDays = 1, DaysToLookAhead = 2, FinalAssemblyDaysToLookAhead = 3, PriorityCutOffDays = 4, PriorityStrategy = 5, SubAssemblyDaysToLookAhead = 6 }; this.PtlSettingsRepository.GetRecord() .Returns(this.settings); this.result = this.Sut.Update(this.resource); }
public void SetUp() { var resource = new PtlSettingsResource { FinalAssemblyDaysToLookAhead = 5 }; var responseModel = new ResponseModel <PtlSettings>(new PtlSettings { FinalAssemblyDaysToLookAhead = 5 }, new List <string>()); this.AuthorisationService.HasPermissionFor(AuthorisedAction.PtlSettingsUpdate, Arg.Any <List <string> >()) .Returns(true); this.PtlSettingsFacadeService.Update( Arg.Is <PtlSettingsResource>(r => r.FinalAssemblyDaysToLookAhead == 5), Arg.Any <List <string> >()) .Returns(new SuccessResult <ResponseModel <PtlSettings> >(responseModel)); this.Response = this.Browser.Put( "/production/maintenance/production-trigger-levels-settings", with => { with.Header("Accept", "application/json"); with.JsonBody(resource); }).Result; }