using System.IO; using Graph.Interfaces; namespace Graph.IO { // class for writing to file using IFileWriter (i.e. Dependancy injection for unit testing) public class FileWriter : IFileWriter { string FilePath { get; } public FileWriter(string filePath) { FilePath = filePath; } public void WriteAllLines(string[] lines) { File.WriteAllLines(FilePath, lines); } } }