コード例 #1
0
        public void SyllableAnalyzerShouldSplitByVowel()
        {
            var analyzer = new SyllableAnalyzer("testing");
            var groups   = analyzer.ParseVowelGroups().ToArray();

            Assert.AreEqual(new[] { "test", "ing" }, groups);
        }
コード例 #2
0
        private static int GetSyllableCount(string word)
        {
            var analyzer = new SyllableAnalyzer(word);

            return(analyzer.GetCount());
        }
コード例 #3
0
 public void IsDiphthongShouldHandleSpecialCases()
 {
     Assert.False(SyllableAnalyzer.IsDiphthong("ia"), "ia should not be seen as a diphthong");
     Assert.False(SyllableAnalyzer.IsDiphthong("io"), "io should not be seen as a diphthong");
 }
コード例 #4
0
 public void IsDiphthongShouldDetectDiphthongsCorrectly()
 {
     Assert.True(SyllableAnalyzer.IsDiphthong("oi"), "oi should be seen as a diphthong");
     Assert.False(SyllableAnalyzer.IsDiphthong("op"), "op should not be seen as a diphthong");
 }
コード例 #5
0
 private static int GetSyllableCount(string word)
 {
     var analyzer = new SyllableAnalyzer(word);
     return analyzer.GetCount();
 }
コード例 #6
0
 public void SyllableAnalyzerShouldSplitByVowel()
 {
     var analyzer = new SyllableAnalyzer("testing");
     var groups = analyzer.ParseVowelGroups().ToArray();
     Assert.AreEqual(new[] {"test", "ing"}, groups);
 }