public static Generate ( int sizeInBytes = null ) : IEnumerable |
||
sizeInBytes | int | |
return | IEnumerable |
public void CanUploadFiles() { using (var session = OpenSession()) { var localFiles = DummyFile.Generate().Take(3).ToArray(); foreach (var localFile in localFiles) { session.UploadFile(localFile.FileInfo); Assert.True(session.FileExists(localFile.FileInfo.Name)); } localFiles.Dispose(); } }
public void CanUploadFilesIntoDeepSubDirectories() { using (var session = OpenSession()) { var localFiles = DummyFile.Generate().Take(3).ToArray(); foreach (var localFile in localFiles) { session.UploadFile(localFile.FileInfo, remoteDirectoryPath: "cheech/chong/marvin/gaye/"); Assert.True(session.FileExists(string.Format("/cheech/chong/marvin/gaye/{0}", localFile.FileInfo.Name))); } localFiles.Dispose(); } }
public void CanUploadFilesIntoSubDirectoryWithAnyPrePostSlashes() { using (var session = OpenSession()) { var localFiles = DummyFile.Generate().Take(3).ToArray(); foreach (var localFile in localFiles) { session.UploadFile(localFile.FileInfo, remoteDirectoryPath: "/desktop\\"); Assert.True(session.FileExists(string.Format("/desktop/{0}", localFile.FileInfo.Name))); } localFiles.Dispose(); } }
public void CanUploadFilesIntoSubDirectory() { using (var session = OpenSession()) { var localFiles = DummyFile.Generate().Take(3).ToArray(); foreach (var localFile in localFiles) { session.UploadFile(localFile.FileInfo, remoteDirectoryPath: "desktop"); Assert.True(session.FileExists("/desktop/" + localFile.FileInfo.Name)); } localFiles.Dispose(); } }
public void CanUploadFilesDifferentNames() { using (var session = OpenSession()) { var localFiles = DummyFile.Generate().Take(1).ToArray(); foreach (var localFile in localFiles) { var remoteFileName = "goober.dat"; session.UploadFile(localFile.FileInfo, remoteFileName); Assert.True(session.FileExists(remoteFileName)); } localFiles.Dispose(); } }