public void MoveFileTest() { var destFile = RandomData.GenerateRandomFileName(); var tempFile = RandomData.GenerateTempFile(this._fileLength); FileHelper.MoveFile(tempFile, destFile); }
private IEnumerable <FileInfo> GenerateTempFiles() { var files = new List <FileInfo>(this._fileCount); for (var fileCount = 0; fileCount < this._fileCount; fileCount++) { files.Add(new FileInfo(RandomData.GenerateTempFile(this._fileLength))); } return(files.AsEnumerable()); }
public void GenerateTempFileTest() { var stringValue = RandomData.GenerateTempFile(FileLength); Assert.IsNotNull(stringValue); var tempFile = new FileInfo(stringValue); Assert.IsTrue(tempFile.Exists); Assert.IsTrue(tempFile.Length == FileLength); tempFile.Delete(); }