public void ExceptionListIsLoadedForNonVernacularDictionary() { MakeNonPrivateBlahDictionary(); var filePath = SpellingHelper.GetDicPath(SpellingHelper.GetSpellingDirectoryPath(), "blah"); using (var writer = FileUtils.OpenFileForWrite(Path.ChangeExtension(filePath, ".exc"), Encoding.UTF8)) { writer.WriteLine("good"); } var dict = SpellingHelper.GetSpellChecker("blah"); Assert.That(dict.Check("good"), Is.True); }
private static void MakeNonPrivateBlahDictionary() { string dirPath = SpellingHelper.GetSpellingDirectoryPath(); if (!Directory.Exists(dirPath)) { Directory.CreateDirectory(dirPath); } string filePath = SpellingHelper.GetDicPath(dirPath, "blah"); File.Delete(filePath); File.Delete(Path.ChangeExtension(filePath, ".aff")); File.Delete(Path.ChangeExtension(filePath, ".exc")); using (var writer = FileUtils.OpenFileForWrite(Path.ChangeExtension(filePath, ".aff"), Encoding.UTF8)) { writer.WriteLine("SET UTF-8"); } using (var writer = FileUtils.OpenFileForWrite(filePath, Encoding.UTF8)) { writer.WriteLine("10"); writer.WriteLine("blah"); } }