Beispiel #1
0
        public void MoveFileTest()
        {
            var destFile = RandomData.GenerateRandomFileName();
            var tempFile = RandomData.GenerateTempFile(this._fileLength);

            FileHelper.MoveFile(tempFile, destFile);
        }
Beispiel #2
0
        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();
        }