public void Check_AllWordsWithLengthFrom5To15_ShouldReturnTrue() { GrammarChecker <char> checker = GetChecker(); Enumerable.Range(start: 5, count: 10) .SelectMany(length => checker.GetPossibleWordsWithLength(length)) .ForEach(word => { Assert.IsTrue(checker.Check(word)); }); }
private void View_GrammarAnalyzeRequired() { var fileManager = new FileManager(); if (fileManager.OpenFileDialog()) { try { grammarChecker = new GrammarChecker(); var table = grammarChecker.Check(fileManager.Text); view.ShowGrammarTable(table); } catch (Exception e) { view.ShowGrammarError(e.Message); grammarChecker = null; } } }