public void Returns_Https_When_Set() { var sut = new RandomUrl(RandomUri.SchemeType.Https); var value = sut.GetValue(); Assert.IsNotNull(value); var uri = new Uri(value); Assert.AreEqual("https", uri.Scheme); }
public void Returns_Configured_Domain_When_Set() { var sut = new RandomUrl(RandomUri.SchemeType.Https, "net"); var value = sut.GetValue(); Assert.IsNotNull(value); var uri = new Uri(value); Assert.AreEqual("https", uri.Scheme); Assert.IsTrue(uri.Host.EndsWith(".net")); }
public void RandomUrlIsReturned() { var sut = new RandomUrl(); var value = sut.GetValue(); Assert.IsNotNull(value); var uri = new Uri(value); Assert.IsFalse(string.IsNullOrEmpty(uri.Host)); Assert.IsFalse(string.IsNullOrEmpty(uri.Scheme)); Assert.IsFalse(string.IsNullOrEmpty(uri.PathAndQuery)); }