public void ShouldBeAbleToHandleDifferentPronunciations(PronounceRole role, string expected)
        {
            string speech = new Speech()
                            .Say("The word")
                            .Say("read")
                            .AsCharacters()
                            .Say("may be interpreted as")
                            .Say("read")
                            .PronounceAs(role)
                            .Build();

            speech.Should().Be($"<speak>The word <say-as interpret-as=\"characters\">read</say-as> may be interpreted as <w role=\"{expected}\">read</w></speak>");
        }
示例#2
0
 public PronounceWriter(ISpeechWriter writer, PronounceRole role)
 {
     _writer = writer;
     _role   = role;
 }
示例#3
0
 public ISpeech PronounceAs(PronounceRole role)
 {
     _writer = new PronounceWriter(_writer, role);
     return(this);
 }