public async Task GetTextMessageBodyAsync_Sentence_NullOrEmpty_Ignored(string nullOrEmpty)
        {
            var firstSentenceProvider = new Mock <IResponseSentenceProvider>();

            firstSentenceProvider.Setup(p => p.GetResponseSentence(
                                            It.IsAny <GameOption>(), It.IsAny <GameOption>(),
                                            It.IsAny <TurnWinner>(), It.IsAny <PlayerTurnResult>()))
            .Returns("A");

            var secondSentenceProvider = new Mock <IResponseSentenceProvider>();

            secondSentenceProvider.Setup(p => p.GetResponseSentence(
                                             It.IsAny <GameOption>(), It.IsAny <GameOption>(),
                                             It.IsAny <TurnWinner>(), It.IsAny <PlayerTurnResult>()))
            .Returns(nullOrEmpty);

            var target = new Twilio(MockStatelessServiceContextFactory.Default,
                                    new[] { firstSentenceProvider.Object, secondSentenceProvider.Object });

            var result = await target.GetTextMessageBodyAsync(
                GameOption.Paper, GameOption.Scissor,
                TurnWinner.Tie, null);

            Assert.AreEqual("A", result);
        }
        public async Task GetTextMessageBodyAsync_Exception_BubblesUp()
        {
            var firstSentenceProvider = new Mock <IResponseSentenceProvider>();

            firstSentenceProvider.Setup(p => p.GetResponseSentence(
                                            It.IsAny <GameOption>(), It.IsAny <GameOption>(),
                                            It.IsAny <TurnWinner>(), It.IsAny <PlayerTurnResult>()))
            .Returns("A");

            var secondSentenceProvider = new Mock <IResponseSentenceProvider>();

            secondSentenceProvider.Setup(p => p.GetResponseSentence(
                                             It.IsAny <GameOption>(), It.IsAny <GameOption>(),
                                             It.IsAny <TurnWinner>(), It.IsAny <PlayerTurnResult>()))
            .Throws(new ValidationException("Some exception."));

            var target = new Twilio(MockStatelessServiceContextFactory.Default,
                                    new[] { firstSentenceProvider.Object, secondSentenceProvider.Object });

            var exception = await Assert.ThrowsExceptionAsync <ValidationException>(
                async() => await target.GetTextMessageBodyAsync(
                    GameOption.Paper, GameOption.Scissor,
                    TurnWinner.Tie, null));

            Assert.AreEqual("Some exception.", exception.Message);
        }