public void OneTimeSetUp() { _data = new Dictionary <string, object> { { "Authorization", _token } }; _cronController = new CronController { Configuration = new HttpConfiguration(), Request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:9000/") }; _context = new OwinContext(_data); _authHeader = new AuthenticationHeaderValue(_token); _cronController.Request.SetOwinContext(_context); _cronController.Request.GetOwinContext().Request.RemoteIpAddress = _ip; _cronController.Request.Headers.Authorization = _authHeader; _footballDataManager = SingletonManager.Instance.SetFootballDataManager(Substitute.For <IFootballDataManager>()); }
public IFootballDataManager SetFootballDataManager(IFootballDataManager footballDataManager) { return(FootballDataManager = footballDataManager); }