public void CheckingCheckDbConnectionWithGoodConnectionString() { var webclass = new WebClass(); var result = webclass.CheckDbConnection("localhost", "root", "zaq12wsx", "tt_probny"); Assert.That(result, Is.EqualTo(true)); }
public void CheckingCheckFtpConnectionWithBadConnectionString() { var webclass = new WebClass(); var result = webclass.CheckFtpConnection("test", "test", "test", ""); Assert.That(result, Is.EqualTo(false)); }
public void CheckDownloadingOfAFile() { var webclass = new WebClass(); var tempPath = ProductChecksTests.Path(""); const string fileName = "20000152_290_FR01_11.JPG"; const string url = "http://www.louis.de/shop/img450/20000152_290_FR01_11.JPG"; webclass.DownloadFile(url, tempPath, fileName); var fileInfo = new FileInfo(tempPath + fileName); Assert.That(fileInfo.Exists, Is.True); Assert.That(fileInfo.Length, Is.GreaterThan(0)); fileInfo.Delete(); }
public void CheckingCheckFtpConnectionWithGoodConnectionString() { var webclass = new WebClass(); var result = webclass.CheckFtpConnection("localhost", "tomasz", "tomasz123", ""); Assert.That(result, Is.EqualTo(true)); }
public void CheckGetHtmlPageFromSiteWithEmptyValue() { var webclass = new WebClass(); Assert.Throws<UriFormatException>(() => webclass.GetHtmlPageFromSite("")); }
public void CheckGetHtmlPageFromSiteWhenSiteDoesNotExist() { var webclass = new WebClass(); Assert.Throws<WebException>(() => webclass.GetHtmlPageFromSite("http://blablablabla.asdfasdf.com.pl")); }
public void CheckGetHtmlPageFromSiteWhenSiteDoesExists() { var webclass = new WebClass(); Assert.That(webclass.GetHtmlPageFromSite("http://google.pl"), Is.Not.Null); }
public void FtpUploadShouldUploadAFile() { var webclass = new WebClass(); var directory = ProductChecksTests.Path(""); //webclass.FtpUploadFile("xaneak.mine.nu", "pawel123", "pawel", directory, "SubCategory.txt"); }
public void ConnectingToSiteThatDoesExists() { var webclass = new WebClass(); Assert.That(webclass.ConnectingToSite("http://google.pl"), Is.Not.Null); }
public void ConnectingToSiteSiteDoesNotExist() { var webclass = new WebClass(); Assert.Throws<WebException>(() => webclass.ConnectingToSite("http://blablablabla.asdfasdf.com.pl")); }
public void ConnectingToSiteEmptyValue() { var webclass = new WebClass(); Assert.Throws<UriFormatException>(() => webclass.ConnectingToSite("")); }
public void CheckDownloadingOfAFileWithoutAPathAndFilename() { var webclass = new WebClass(); Assert.That(webclass.DownloadFile("", "", ""), Is.False); }
// Constructors public WebItem(string Name, WebClass AssociatedWebClass, string HtmlTemplateFilename) { }
// Constructors public WebItem(string Name, WebClass AssociatedWebClass, string HtmlTemplateFilename) { }