Storage CreateStorage() { FileSystem filesystem = new WindowsFileSystem(); var serializer = new JsonSerializer(readableFormatting: true); var path = filesystem.CreatePath(filesystem.TempDirectory, @"MyTestFile.json"); var storage = new TextFileStorage(filesystem, serializer, path); return(storage); }
public void Test_Sort_SortAscending() { var fileWorker = new TextFileStorage("myfile.log", false); var list = new List <string>() { "c", "a", "b" }; var result = fileWorker.Sort(list); Assert.AreEqual("a", result[0]); Assert.AreEqual("b", result[1]); Assert.AreEqual("c", result[2]); }
public ShowAppController(TvShowService showService, TextFileStorage fileStorage) { _showService = showService; _fileStorage = fileStorage; }