public void SpeechGeneratesWithArguments() { var speech = new Speech(new PlainText(plainText)); var result = ObjectToSpeech.Generate(speech, new object[] { "simple" }); var ssmlResult = ObjectToSpeech.GenerateSsml(speech, new object[] { "simple" }); CorrectSsmlText(result, string.Format(ssmlText, "simple")); CorrectSsmlText(ssmlResult, string.Format(ssmlText, "simple")); }
public void SpeechGeneratesSsmlRegardless() { var speech = new Speech(new PlainText(plainText)); var result = ObjectToSpeech.Generate(speech); var ssmlResult = ObjectToSpeech.Generate(speech); CorrectSsmlText(result); CorrectSsmlText(ssmlResult); }
public void SsmlStringArrayConvertsAccordingToPicker() { var customPicker = Substitute.For <IArrayChoice>(); customPicker.From(Arg.Any <string[]>()).Returns(c => c.Arg <string[]>()[1]); ObjectToSpeech.Pick = customPicker; var result = ObjectToSpeech.GenerateSsml(new[] { "test", "thing" }); CorrectSsmlText(result, "thing"); }
public void StringSsmlParamsConvertsCorrectly() { var result = ObjectToSpeech.GenerateSsml(plainText, new[] { "simple" }); CorrectSsmlText(result, "this is a simple test"); }
public void StringSsmlConvertsCorrect() { var result = ObjectToSpeech.GenerateSsml(ssmlText); CorrectSsmlText(result); }
public void StringConvertsCorrectly() { var result = ObjectToSpeech.Generate(plainText); CorrectPlainText(result); }