Beispiel #1
0
        public void file_adapter_can_read_and_write_lines_to_file()
        {
            var temporaryFilePath = Path.GetTempFileName();
            var originalText      = "this is some temporary\n text to write\n to files\n";

            _fileAdapter.WriteAllText(temporaryFilePath, originalText);

            var writtenText = _fileAdapter.ReadAllText(temporaryFilePath);

            Assert.That(writtenText, Is.EqualTo(originalText));
        }
        private void Save(string destinationPath)
        {
            var fileAdapter = new FileAdapter();

            fileAdapter.WriteAllText(destinationPath, _configContents);
        }