public void TestSaveASSorted()
        {
            string dir      = Directory.GetCurrentDirectory();
            var    fullpath = Path.Combine(dir, @"ExampleFiles\ValidTxtFile.txt");
            var    result   = new TxtFile(fullpath);

            result.SortWords();
            result.SaveSortedFile();
        }
Example #2
0
        public void SaveSortedFile_DoesSaveFile()
        {
            var fullpath = Path.Combine(Directory.GetCurrentDirectory(), @"ExampleFiles\ValidTxtFile.txt");
            var result   = new TxtFile(fullpath);

            result.SortWords();
            result.SaveSortedFile();
            bool fileExist = File.Exists(Path.Combine(Directory.GetCurrentDirectory(), @"ExampleFiles\ValidTxtFile_SortedWords.txt"));

            Assert.IsTrue(fileExist);
        }