public HomeController(BlogService blogService, UserService userService, CategoryService categoryService, OpenSourceService openSourceService, BlogCommentService blogCommentService, NewsService newsService, IOptions <WebStaticConfig> options) : base(options) { this._blogService = blogService; this._userService = userService; this._categoryService = categoryService; this._openSourceService = openSourceService; this._blogCommentService = blogCommentService; this._newsService = newsService; }
//ToDo: Start WebDev.WebServer.exe before the tests are run in TestSetup then delete this test public void SanityTest() { var service = new OpenSourceService(); try { service.GetProjectsByUsernameXml(ProjectHost.GitHub.ToString(), "AdamDotCom"); } catch (Exception) { Assert.Fail("WebDev.WebServer.exe (cassini) probably isn't running, try starting up the ServiceHost project."); } }
//ToDo: Start WebDev.WebServer.exe before the tests are run in TestSetup then delete this test public void SanityTest() { var service = new OpenSourceService(); try { service.GetProjectsByUsernameXml(ProjectHost.GitHub.ToString(), "AdamDotCom"); } catch(Exception) { Assert.Fail("WebDev.WebServer.exe (cassini) probably isn't running, try starting up the ServiceHost project."); } }
public void ShouldVerifyProxyAndGetGetProjectsByProjectHostAndUsernameXml() { var service = new OpenSourceService(); var resultsXml = service.GetProjectsByProjectHostAndUsernameXml("github:adamdotcom,googlecode:adam.kahtava.com", null); Assert.IsNotNull(resultsXml); Assert.Greater(resultsXml.Count, 1); var resultsJson = service.GetProjectsByProjectHostAndUsernameJson("github:adamdotcom,googlecode:adam.kahtava.com", null); Assert.IsNotNull(resultsJson); Assert.Greater(resultsJson.Count, 1); }
public void ShouldVerifyProxyAndGetProjectsByUsername() { var service = new OpenSourceService(); var resultsXml = service.GetProjectsByUsernameXml(ProjectHost.GitHub.ToString(), "AdamDotCom"); Assert.IsNotNull(resultsXml); Assert.Greater(resultsXml.Count, 1); var resultsJson = service.GetProjectsByUsernameJson(ProjectHost.GoogleCode.ToString(), "adam.kahtava.com"); Assert.IsNotNull(resultsJson); Assert.Greater(resultsXml.Count, 1); }
public void ShouldVerifyProxyAndThrowException() { var service = new OpenSourceService(); service.GetProjectsByUsernameXml(ProjectHost.Unknown.ToString(), "AdamDotCom"); }
public OpenSourceController(OpenSourceService openSourceService) { this._openSourceService = openSourceService; }
public OpenSourceController(OpenSourceService openSourceService, UserService userService, IOptions <WebStaticConfig> options) { this._openSourceServic = openSourceService; this._userService = userService; this._webStaticConfig = options.Value; }