コード例 #1
0
 public void FAIL_CreateUriProvider_BadUri()
 {
     try
     {
         IUriProvider uriProvider = new ElasticUriProvider("asdf;lkjasdf");
         Assert.Fail();
     }
     catch (UriFormatException ex)
     {
         Assert.IsTrue(true);
     }
 }
コード例 #2
0
 public void FAIL_CreateUriProvider_Null()
 {
     try
     {
         IUriProvider uriProvider = new ElasticUriProvider(new Uri(null));
         Assert.Fail();
     }
     catch (ArgumentNullException ex)
     {
         Assert.IsTrue(true);
     }
     catch (Exception ex)
     {
         Assert.Fail();
     }
 }
コード例 #3
0
 public void FAIL_CreateUriProvider_EmptyString()
 {
     try
     {
         IUriProvider uriProvider = new ElasticUriProvider("");
         Assert.Fail();
     }
     catch (UriFormatException ex)
     {
         Assert.IsTrue(true);
     }
     catch (Exception ex)
     {
         Assert.Fail();
     }
 }
コード例 #4
0
 public void PASS_CreateUriProvider_Uri()
 {
     IUriProvider uriProvider = new ElasticUriProvider(new Uri("http://www.google.com"));
     Assert.IsNotNull(uriProvider);
     Assert.IsNotNull(uriProvider.Uri);
 }