コード例 #1
0
        public void CheckingCheckDbConnectionWithGoodConnectionString()
        {
            var webclass = new WebClass();

            var result = webclass.CheckDbConnection("localhost", "root", "zaq12wsx", "tt_probny");

            Assert.That(result, Is.EqualTo(true));
        }
コード例 #2
0
        public void CheckingCheckFtpConnectionWithBadConnectionString()
        {
            var webclass = new WebClass();

            var result = webclass.CheckFtpConnection("test", "test", "test", "");

            Assert.That(result, Is.EqualTo(false));
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        public void CheckingCheckFtpConnectionWithGoodConnectionString()
        {
            var webclass = new WebClass();

            var result = webclass.CheckFtpConnection("localhost", "tomasz", "tomasz123", "");

            Assert.That(result, Is.EqualTo(true));
        }
コード例 #5
0
 public void CheckGetHtmlPageFromSiteWithEmptyValue()
 {
     var webclass = new WebClass();
     Assert.Throws<UriFormatException>(() => webclass.GetHtmlPageFromSite(""));
 }
コード例 #6
0
 public void CheckGetHtmlPageFromSiteWhenSiteDoesNotExist()
 {
     var webclass = new WebClass();
     Assert.Throws<WebException>(() => webclass.GetHtmlPageFromSite("http://blablablabla.asdfasdf.com.pl"));
 }
コード例 #7
0
 public void CheckGetHtmlPageFromSiteWhenSiteDoesExists()
 {
     var webclass = new WebClass();
     Assert.That(webclass.GetHtmlPageFromSite("http://google.pl"), Is.Not.Null);
 }
コード例 #8
0
 public void FtpUploadShouldUploadAFile()
 {
     var webclass = new WebClass();
     var directory = ProductChecksTests.Path("");
     //webclass.FtpUploadFile("xaneak.mine.nu", "pawel123", "pawel", directory, "SubCategory.txt");
 }
コード例 #9
0
 public void ConnectingToSiteThatDoesExists()
 {
     var webclass = new WebClass();
     Assert.That(webclass.ConnectingToSite("http://google.pl"), Is.Not.Null);
 }
コード例 #10
0
 public void ConnectingToSiteSiteDoesNotExist()
 {
     var webclass = new WebClass();
     Assert.Throws<WebException>(() => webclass.ConnectingToSite("http://blablablabla.asdfasdf.com.pl"));
 }
コード例 #11
0
 public void ConnectingToSiteEmptyValue()
 {
     var webclass = new WebClass();
     Assert.Throws<UriFormatException>(() => webclass.ConnectingToSite(""));
 }
コード例 #12
0
 public void CheckDownloadingOfAFileWithoutAPathAndFilename()
 {
     var webclass = new WebClass();
     Assert.That(webclass.DownloadFile("", "", ""), Is.False);
 }
コード例 #13
0
 // Constructors
 public WebItem(string Name, WebClass AssociatedWebClass, string HtmlTemplateFilename)
 {
 }
コード例 #14
0
 // Constructors
 public WebItem(string Name, WebClass AssociatedWebClass, string HtmlTemplateFilename)
 {
 }