public void PrintDoubleLetterStatistic_RusVowel() { var ms = new MemoryStream(); var writer = new StreamWriter(ms); writer.Write("ДвойныыеБууквыУУу"); writer.Flush(); ms.Seek(0, SeekOrigin.Begin); var reader = new ReadOnlyStream(ms); var analyzer = new LetterAnalyzer(reader); var printer = new LetterPrinterToList(); analyzer.PrintDoubleLetterStatistic(printer, CharType.Vowel); var oneLetter = printer.lettersPrintered[0]; Assert.AreEqual('Ы', oneLetter.Letter); Assert.AreEqual(1, oneLetter.Count); oneLetter = printer.lettersPrintered[1]; Assert.AreEqual('У', oneLetter.Letter); Assert.AreEqual(2, oneLetter.Count); }
public void PrintSingleLetterStatistic_Eng() { var ms = new MemoryStream(); var writer = new StreamWriter(ms); writer.Write("aicaiiBifB"); writer.Flush(); ms.Seek(0, SeekOrigin.Begin); var reader = new ReadOnlyStream(ms); var analyzer = new LetterAnalyzer(reader); var printer = new LetterPrinterToList(); analyzer.PrintSingleLetterStatistic(printer, CharType.Vowel); var oneLetter = printer.lettersPrintered[0]; Assert.AreEqual('a', oneLetter.Letter); Assert.AreEqual(2, oneLetter.Count); oneLetter = printer.lettersPrintered[1]; Assert.AreEqual('i', oneLetter.Letter); Assert.AreEqual(4, oneLetter.Count); }
public void PrintSingleLetterStatistic_SkipNumber() { var ms = new MemoryStream(); var writer = new StreamWriter(ms); writer.Write("aica123"); writer.Flush(); ms.Seek(0, SeekOrigin.Begin); var reader = new ReadOnlyStream(ms); var analyzer = new LetterAnalyzer(reader); var printer = new LetterPrinterToList(); analyzer.PrintSingleLetterStatistic(printer, CharType.Consonants); Assert.AreEqual(1, printer.lettersPrintered.Count); }
public void PrintDoubleLetterStatistic_NotDouble() { var ms = new MemoryStream(); var writer = new StreamWriter(ms); writer.Write("A1A"); writer.Flush(); ms.Seek(0, SeekOrigin.Begin); var reader = new ReadOnlyStream(ms); var analyzer = new LetterAnalyzer(reader); var printer = new LetterPrinterToList(); analyzer.PrintDoubleLetterStatistic(printer, CharType.Vowel); Assert.AreEqual(0, printer.lettersPrintered.Count); }
public void PrintSingleLetterStatistic_EngRemoveNotConsonants() { var ms = new MemoryStream(); var writer = new StreamWriter(ms); writer.Write("aicaiiBifB"); writer.Flush(); ms.Seek(0, SeekOrigin.Begin); var reader = new ReadOnlyStream(ms); var analyzer = new LetterAnalyzer(reader); var printer = new LetterPrinterToList(); analyzer.PrintSingleLetterStatistic(printer, CharType.Consonants); var oneLetter = printer.lettersPrintered[0]; Assert.AreEqual(3, printer.lettersPrintered.Count); }
public void PrintSingleLetterStatistic_RusVowel() { var ms = new MemoryStream(); var writer = new StreamWriter(ms); writer.Write("ПриведМедвед"); writer.Flush(); ms.Seek(0, SeekOrigin.Begin); var reader = new ReadOnlyStream(ms); var analyzer = new LetterAnalyzer(reader); var printer = new LetterPrinterToList(); analyzer.PrintSingleLetterStatistic(printer, CharType.Vowel); var oneLetter = printer.lettersPrintered[1]; Assert.AreEqual('е', oneLetter.Letter); Assert.AreEqual(3, oneLetter.Count); }
public void PrintDoubleLetterStatistic_SkipSpace() { var ms = new MemoryStream(); var writer = new StreamWriter(ms); writer.Write("шш ШШ "); writer.Flush(); ms.Seek(0, SeekOrigin.Begin); var reader = new ReadOnlyStream(ms); var analyzer = new LetterAnalyzer(reader); var printer = new LetterPrinterToList(); analyzer.PrintDoubleLetterStatistic(printer, CharType.Consonants); var oneLetter = printer.lettersPrintered[0]; Assert.AreEqual('Ш', oneLetter.Letter); Assert.AreEqual(2, oneLetter.Count); Assert.AreEqual(1, printer.lettersPrintered.Count); }