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 StringArrayConvertsAccordingToPicker() { var customPicker = Substitute.For <IArrayChoice>(); customPicker.From(Arg.Any <string[]>()).Returns(c => c.Arg <string[]>()[1]); ObjectToSpeech.Pick = customPicker; var result = ObjectToSpeech.Generate(new[] { "test", "thing" }); CorrectPlainText(result, "thing"); }
public void StringParamsConvertsCorrectly() { var result = ObjectToSpeech.Generate(plainText, new [] { "simple" }); CorrectPlainText(result, "this is a simple test"); }
public void StringConvertsCorrectly() { var result = ObjectToSpeech.Generate(plainText); CorrectPlainText(result); }