コード例 #1
0
 public void getMemoryStreamTest()
 {
     ConnectController target = new ConnectController();
     string url = "http://www.google.com.br/images/srpr/logo3w.png";
     Stream actual = target.getMemoryStream(url);
     Assert.IsNotNull(actual);
 }
コード例 #2
0
 public void getJsonTest()
 {
     ConnectController target = new ConnectController();
     //string url = "http://www.uol.com.br";
     string url = "http://www.google.com.br";
     string actual = target.getJson(url);
     Assert.IsNotNull(actual);
 }
コード例 #3
0
 public void postJsonTest()
 {
     try
     {
         ConnectController target = new ConnectController();
         string url = "http://us.blizzard.com/en-us/";
         NameValueCollection parametros = new NameValueCollection();
         string actual;
         actual = target.postJson(url, parametros);
     }
     catch (Exception e)
     {
         Assert.AreEqual("The remote server returned an error: (404) Not Found.",e.Message);
     }
 }