public void Init() { _sessionService = Substitute.For <ISessionService>(); _compositeSettings = Options.Create(new CompositeSettings()); _dysacServiceSetings = Options.Create(new DysacSettings()); _dysacServiceSetings.Value.ApiUrl = "https://dev.api.nationalcareersservice.org.uk/something"; _dysacServiceSetings.Value.ApiKey = "mykeydoesnotmatterasitwillbemocked"; _dysacServiceSetings.Value.DysacUrl = "http://dysacurl"; _dysacService = Substitute.For <IDysacSessionReader>(); var userSession = new UserSession() { UserSessionId = "sd", PartitionKey = "Key", CurrentPage = "string", DysacJobCategories = new DysacJobCategory[1], LastUpdatedUtc = DateTime.UtcNow, Occupations = new HashSet <UsOccupation>() { new UsOccupation("1", "Occupation 1"), new UsOccupation("2", "Occupation 1") }, PreviousPage = "previous", Salt = "salt", RouteIncludesDysac = true, Skills = new HashSet <UsSkill>() { new UsSkill("1", "skill1"), new UsSkill("2", "skill2") }, UserHasWorkedBefore = true }; _sessionService.GetUserSession().ReturnsForAnyArgs(userSession); }
public WorkedController(IOptions <CompositeSettings> compositeSettings, ISessionService sessionService, IDysacSessionReader dysacService, IOptions <DysacSettings> dysacSettings) : base(compositeSettings, sessionService) { Throw.IfNull(dysacSettings, nameof(dysacSettings)); _dysacSettings = dysacSettings; _dysacService = dysacService; }
public RouteController(IOptions <CompositeSettings> compositeSettings, ISessionService sessionService, IDysacSessionReader dysacService, IOptions <DysacSettings> dysacSettings) : base(compositeSettings, sessionService) { _dysacService = dysacService; _dysacSettings = dysacSettings; }
public void Init() { _compositeSettings = Options.Create(new CompositeSettings()); _sessionService = Substitute.For <ISessionService>(); _sessionService.GetUserSession().ReturnsForAnyArgs(new UserSession()); _dysacServiceSetings = Options.Create(new DysacSettings()); _dysacServiceSetings.Value.ApiUrl = "https://dev.api.nationalcareersservice.org.uk/something"; _dysacServiceSetings.Value.ApiKey = "mykeydoesnotmatterasitwillbemocked"; _dysacServiceSetings.Value.DysacUrl = "http://dysacurl"; _dysacService = Substitute.For <IDysacSessionReader>(); }
public void Init() { _oldDysacServiceSetings = Options.Create(new OldDysacSettings() { ApiKey = "9238dfjsjdsidfs83fds", AssessmentApiUrl = "https://this.is.anApi.org.uk", DysacResultsUrl = "https://this.is.anApi.org.uk", }); _dysacServiceSetings = Options.Create(new DysacSettings()); _dysacServiceSetings.Value.ApiUrl = "https://dev.api.nationalcareersservice.org.uk/something"; _dysacServiceSetings.Value.ApiKey = "mykeydoesnotmatterasitwillbemocked"; _dysacServiceSetings.Value.DysacUrl = "http://dysacurl"; _dysacServiceSetings.Value.ApiVersion = "v1"; _dysacService = Substitute.For <IDysacSessionReader>(); _log = Substitute.For <ILogger <DysacService> >(); _sessionClient = Substitute.For <ISessionClient>(); _restClient = Substitute.For <IRestClient>(); }