public void CanUploadToSubSubDir() { using (var file = new DummyFile(1024 * 1024 * 3)) { Sftp.UploadFile(Cs, file.FileInfo.FullName, true, "a/b/c"); } }
public void CanUploadToRootDir() { using (var file = new DummyFile(1024 * 1024 * 3)) { Sftp.UploadFile(Cs, file.FileInfo.FullName, true); } }
public void CanUploadToSubDir() { using (var file = new DummyFile(1024 * 1024 * 3)) { Sftp.UploadFile(Cs, file.FileInfo.FullName, true, "subdir"); } }
public void CanUpload2FilesToRootDir() { using (var file1 = new DummyFile(1024 * 1024 * 3)) using (var file2 = new DummyFile(1024 * 1024 * 3)) { Sftp.UploadFiles(Cs, file1.FileInfo.DirectoryName, SearchPattern, true); } }
public void CanUpload2FilesToRootDir() { using (var file1 = new DummyFile(1024 * 1024 * 3)) using (var file2 = new DummyFile(1024 * 1024 * 3)) { Sftp.UploadFiles(Cs, file1.FileInfo.DirectoryName, SearchPattern, true); } }
public void UnnamedGroup() { var environment = new Environment(); var filter = new RegexFilter(@"^file(\d+)\.txt$"); var file = new DummyFile("file456.txt"); filter.IsMatch(file, environment); Assert.AreEqual("456", environment.Get("1")); }
public void UnnamedGroup() { var environment = new Environment(); var filter = new RegexFilter(@"^file(\d+)\.txt$"); var file = new DummyFile("file456.txt"); filter.IsMatch(file, environment); Assert.AreEqual("456", environment.Get("1")); }
public void CanUploadFileToRootDirUsingProperties() { using (var file = new DummyFile(1024 * 1024 * 3)) { var csb = new DbConnectionStringBuilder { ConnectionString = Cs }; Sftp.Host = csb["host"] as string; Sftp.Username = csb["username"] as string; Sftp.Password = csb["password"] as string; Sftp.Hostkey = csb["hostkey"] as string; Sftp.Port = csb.ContainsKey("port") ? csb["port"] as string : string.Empty; Sftp.UploadFile(file.FileInfo.FullName, true); } }
public void CanMakeAndDeleteADummyFile() { const int mb = 1048576; const int twentyMb = mb * 20; FileInfo theFile; using (var dummy = new DummyFile(twentyMb)) { theFile = dummy.FileInfo; Assert.That(theFile.Exists, Is.True); Assert.That(theFile.Length, Is.EqualTo(twentyMb)); } theFile.Refresh(); Assert.That(theFile.Exists, Is.False); }
public void CanMakeAndDeleteADummyFile() { const int mb = 1048576; const int twentyMb = mb * 20; FileInfo theFile; using (var dummy = new DummyFile(twentyMb)) { theFile = dummy.FileInfo; Assert.That(theFile.Exists, Is.True); Assert.That(theFile.Length, Is.EqualTo(twentyMb)); } theFile.Refresh(); Assert.That(theFile.Exists, Is.False); }
public void CanUploadFileToRootDirUsingProperties() { using (var file = new DummyFile(1024 * 1024 * 3)) { var csb = new DbConnectionStringBuilder { ConnectionString = Cs }; Sftp.Host = csb["host"] as string; Sftp.Username = csb["username"] as string; Sftp.Password = csb["password"] as string; Sftp.Hostkey = csb["hostkey"] as string; Sftp.Port = csb.ContainsKey("port") ? csb["port"] as string : string.Empty; Sftp.UploadFile(file.FileInfo.FullName, true); } }
public void NonMatch() { var file = new DummyFile("NonMatchingFile.txt"); Assert.IsFalse(filter.IsMatch(file, environment)); }
public void Match() { var file = new DummyFile("MatchingFile.txt"); Assert.IsTrue(filter.IsMatch(file, environment)); }
public void NonMatch() { var file = new DummyFile("NonMatchingFile.txt"); Assert.IsFalse(filter.IsMatch(file, environment)); }
public void FixtureSetUp() { Application.Init(); m_File = new DummyFile("AddExtension_ExtensionIncluded.txt"); }
public void FixtureSetUp() { Application.Init(); m_File = new DummyFile("AddExtension_ExtensionIncluded.txt"); }
public void Match() { var file = new DummyFile("MatchingFile.txt"); Assert.IsTrue(filter.IsMatch(file, environment)); }