public void FAIL_CreateUriProvider_BadUri() { try { IUriProvider uriProvider = new ElasticUriProvider("asdf;lkjasdf"); Assert.Fail(); } catch (UriFormatException ex) { Assert.IsTrue(true); } }
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(); } }
public void FAIL_CreateUriProvider_EmptyString() { try { IUriProvider uriProvider = new ElasticUriProvider(""); Assert.Fail(); } catch (UriFormatException ex) { Assert.IsTrue(true); } catch (Exception ex) { Assert.Fail(); } }
public void PASS_CreateUriProvider_Uri() { IUriProvider uriProvider = new ElasticUriProvider(new Uri("http://www.google.com")); Assert.IsNotNull(uriProvider); Assert.IsNotNull(uriProvider.Uri); }