Baseline.Testing.FileSystemIntegrationTester.moving_a_file_should_create_the_target_directory_path_if_necessary C# (CSharp) Метод

moving_a_file_should_create_the_target_directory_path_if_necessary() приватный Метод

private moving_a_file_should_create_the_target_directory_path_if_necessary ( ) : void
Результат void
        public void moving_a_file_should_create_the_target_directory_path_if_necessary()
        {
            var fromDir = Path.Combine(_basePath, randomName());
            var fromPath = Path.Combine(fromDir, "file.txt");
            var stream = new MemoryStream(new byte[] { 55, 66, 77, 88 });
            _fileSystem.WriteStreamToFile(fromPath, stream);

            var toDir = Path.Combine(_basePath, randomName());
            var toPath = Path.Combine(toDir, "newfilename.txt");

            _fileSystem.MoveFile(fromPath, toPath);

            Directory.Exists(toDir).ShouldBeTrue();
        }