public void Can_read_url() { IWebDataReader reader = new WebDataReader(); string webData = reader.ReadUrl("http://www.google.com/"); Assert.That(webData.Contains("Google")); }
public void Can_post_to_form() { IWebDataReader reader = new WebDataReader(); string webData = reader.ReadUrl("http://www.interlacken.com/webdbdev/ch05/formpost.asp", "box1", "Hello World"); Assert.That(webData.Contains("HELLO WORLD")); }
private CurrencyList LoadCurrecyListFromWeb() { CurrencyList CurrencyList = new CurrencyList(); WebDataReader WDR = new WebDataReader(); var jCurrencyList = WDR.LoadJCurrency(); if (jCurrencyList != null) { CurrencyList = GetCurrencyListFromJCurrencyList(jCurrencyList); } else { throw new Exception("Can't find currency data."); } return(CurrencyList); }