public void TestWebmasterToolsKeywordsRequest() { Tracing.TraceMsg("Entering Webmaster Tools Keywords RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed<Keywords> keywords = f.GetKeywords("http%3A%2F%2Fwww%2Eexample%2Ecom%2F"); foreach (Keywords keyword in keywords.Entries) { Assert.IsTrue(keyword.AtomEntry != null, "There should be an atomentry"); } }
public void TestWebmasterToolsCrawlIssuesRequest() { Tracing.TraceMsg("Entering Webmaster Tools Crawl Issues RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed<CrawlIssues> crawlIssues = f.GetCrawlIssues("http%3A%2F%2Fwww%2Eexample%2Ecom%2F"); foreach (CrawlIssues crawlIssue in crawlIssues.Entries) { Assert.IsTrue(crawlIssue.AtomEntry != null, "There should be an atomentry"); } }
public void AddSite() { RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Sites site = new Sites(); site.AtomEntry = new AtomEntry(); site.AtomEntry.Content.Src = "http://www.example-five.com/"; site.AtomEntry.Content.Type = "text/plain"; Sites newSite = f.AddSite(site); Assert.IsNotNull(newSite); }
public void TestWebmasterToolsMessagesRequest() { Tracing.TraceMsg("Entering Webmaster Tools Keywords RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed <Messages> messages = f.GetMessages(); foreach (Messages message in messages.Entries) { Assert.IsTrue(message.AtomEntry != null, "There should be an atomentry"); } }
public void TestWebmasterToolsKeywordsRequest() { Tracing.TraceMsg("Entering Webmaster Tools Keywords RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed <Keywords> keywords = f.GetKeywords("http%3A%2F%2Fwww%2Eexample%2Ecom%2F"); foreach (Keywords keyword in keywords.Entries) { Assert.IsTrue(keyword.AtomEntry != null, "There should be an atomentry"); } }
public void TestWebmasterToolsCrawlIssuesRequest() { Tracing.TraceMsg("Entering Webmaster Tools Crawl Issues RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed <CrawlIssues> crawlIssues = f.GetCrawlIssues("http%3A%2F%2Fwww%2Eexample%2Ecom%2F"); foreach (CrawlIssues crawlIssue in crawlIssues.Entries) { Assert.IsTrue(crawlIssue.AtomEntry != null, "There should be an atomentry"); } }
public void TestWebmasterToolsSitemapsRequest() { Tracing.TraceMsg("Entering Webmaster Tools Sitemap RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed <Sitemap> sitemaps = f.GetSitemaps("http%3A%2F%2Fwww%2Eexample%2Ecom%2F"); foreach (Sitemap sitemap in sitemaps.Entries) { Assert.IsTrue(sitemap.AtomEntry != null, "There should be an atomentry"); } }
public void RequestUpdateGeolocation() { RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); try { Sites site = new Sites("http://www.example.com", "text/plain"); Sites newSite = f.AddSite(site); newSite.GeoLocation = "US"; //Sites updatedSite = f.Update(newSite); Sites updatedSite = f.UpdateSiteEntry(newSite, "http://www.example.com"); Assert.IsNotNull(updatedSite); } finally { Uri deleteUrl = SitesQuery.CreateCustomUri("http://www.example.com"); f.Delete(deleteUrl, null); } }
public void RequestUpdateGeolocation() { RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); try { Sites site = new Sites("http://www.example.com", "text/plain"); Sites newSite = f.AddSite(site); newSite.GeoLocation = "US"; //Sites updatedSite = f.Update(newSite); Sites updatedSite = f.UpdateSiteEntry(newSite, "http://www.example.com"); Assert.IsNotNull(updatedSite); } finally { Uri deleteUrl = SitesQuery.CreateCustomUri("http://www.example.com"); f.Delete(deleteUrl, null); } }
public void TestWebmasterToolsMessagesRequest() { Tracing.TraceMsg("Entering Webmaster Tools Keywords RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed<Messages> messages = f.GetMessages(); foreach (Messages message in messages.Entries) { Assert.IsTrue(message.AtomEntry != null, "There should be an atomentry"); } }
public void TestWebmasterToolsSitemapsRequest() { Tracing.TraceMsg("Entering Webmaster Tools Sitemap RequestTest"); RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Feed<Sitemap> sitemaps = f.GetSitemaps("http%3A%2F%2Fwww%2Eexample%2Ecom%2F"); foreach (Sitemap sitemap in sitemaps.Entries) { Assert.IsTrue(sitemap.AtomEntry != null, "There should be an atomentry"); } }
public void AddSite() { RequestSettings settings = new RequestSettings("NETUnittests", this.userName, this.passWord); WebmasterToolsRequest f = new WebmasterToolsRequest(settings); Sites site = new Sites(); site.AtomEntry = new AtomEntry(); site.AtomEntry.Content.Src = "http://www.example-five.com/"; site.AtomEntry.Content.Type = "text/plain"; Sites newSite = f.AddSite(site); Assert.IsNotNull(newSite); }