Example #1
0
        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"));
        }
Example #2
0
        public void SpeechGeneratesSsmlRegardless()
        {
            var speech     = new Speech(new PlainText(plainText));
            var result     = ObjectToSpeech.Generate(speech);
            var ssmlResult = ObjectToSpeech.Generate(speech);

            CorrectSsmlText(result);
            CorrectSsmlText(ssmlResult);
        }
Example #3
0
        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");
        }
Example #4
0
        public void StringSsmlParamsConvertsCorrectly()
        {
            var result = ObjectToSpeech.GenerateSsml(plainText, new[] { "simple" });

            CorrectSsmlText(result, "this is a simple test");
        }
Example #5
0
        public void StringSsmlConvertsCorrect()
        {
            var result = ObjectToSpeech.GenerateSsml(ssmlText);

            CorrectSsmlText(result);
        }
Example #6
0
        public void StringConvertsCorrectly()
        {
            var result = ObjectToSpeech.Generate(plainText);

            CorrectPlainText(result);
        }