public void Ctor_ValidStringParameter_Ok() { // Arrange String uri = new Uri("http://test.url.com").ToString(); // Action RssUrl rssUrl = new RssUrl(uri); // Assert Assert.AreEqual(uri, rssUrl.UrlString); }
public void Ctor_ValidUriParameter_Ok() { // Arrange Uri uri = new Uri("http://test.url.com"); // Action RssUrl rssUrl = new RssUrl(uri); // Assert Assert.AreEqual(uri, rssUrl.Url); }
public void SetString_ConvertToUri_Uri() { // Arrange RssUrl rssUrl = new RssUrl(); Uri uri = new Uri("http://test.url.com"); // Action rssUrl.Url = uri; // Assert Assert.AreEqual(uri.AbsoluteUri, rssUrl.UrlString); }
public void SetString_ValidStringParameter_Ok() { // Arrange var rssUrl = new RssUrl(); String uri = new Uri("http://test.url.com").ToString(); // Action rssUrl.UrlString = uri; // Assert Assert.AreEqual(uri, rssUrl.UrlString); }
public void SetUri_ValidUriParameter_Ok() { // Arrange RssUrl rssUrl = new RssUrl(); Uri uri = new Uri("http://test.url.com"); // Action rssUrl.Url = uri; // Assert Assert.AreEqual(uri, rssUrl.Url); }
public void SetString_Null_UriNull() { // Arrange RssUrl rssUrl = new RssUrl(); // Action rssUrl.UrlString = null; // Assert Assert.AreEqual(null, rssUrl.Url); }
public void SetString_InvalidUriFormat_Error() { // Arrange RssUrl rssUrl = new RssUrl(); const string InvalidUri = "adsfsadf"; // Action RSSParameterException e = null; try { rssUrl.UrlString = InvalidUri; } catch (RSSParameterException ex) { e = ex; } // Assert Assert.IsNotNull(e); }