Ejemplo n.º 1
0
        public static void Abstract_intent_request__generate_alexa_tell_with_card_response()
        {
            // Arrange
            var speechOutput = "<speak>foo-bar<break strength=\"x-strong\"/>I hope you have a good day.</speak>";
            var speech       = new SsmlOutputSpeech {
                Ssml = speechOutput
            };
            var expectedResponse = ResponseBuilder.TellWithCard(speech, "Jukebox Request", speechOutput);

            // Act
            var response = AlexaResponse.GenerateAlexaTellWithCardResponse("foo-bar", "bat-baz");

            // Assert
            var expectedOutputSpeech = (SsmlOutputSpeech)expectedResponse.Response.OutputSpeech;
            var responseOutputSpeech = (SsmlOutputSpeech)response.Response.OutputSpeech;

            Assert.Equal(expectedOutputSpeech.Ssml, responseOutputSpeech.Ssml);
            Assert.Equal(expectedOutputSpeech.Type, responseOutputSpeech.Type);
            Assert.Equal(expectedResponse.SessionAttributes, response.SessionAttributes);
        }