public async Task KeepAlive_SiteNotFound_ReturnsFalse() { var sut = new KeepAliveService(_client, _configuration, _logger); var result = await sut.KeepAlive("http://example.org/notthere", new CancellationToken()); Assert.IsFalse(result); }
public async Task KeepAlive_SiteOK_ReturnsTrue() { var sut = new KeepAliveService(_client, _configuration, _logger); var result = await sut.KeepAlive("http://example.org/test", new CancellationToken()); Assert.IsTrue(result); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); //WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); //BundleConfig.RegisterBundles(BundleTable.Bundles); DependencyConfig.RegisterDependencyResolvers(); KeepAliveService.Start(); }
protected void Application_End() { KeepAliveService.Stop(); }