Ejemplo n.º 1
0
        public async Task GetUserInputAsync_Scissor(string input)
        {
            var target = new Twilio(MockStatelessServiceContextFactory.Default, null);

            var result = await target.GetUserInputAsync(input);

            Assert.AreEqual(GameOption.Scissor, result);
        }
Ejemplo n.º 2
0
        public async Task GetUserInputAsync_InvalidInput()
        {
            var target = new Twilio(MockStatelessServiceContextFactory.Default, null);

            var exception = await Assert.ThrowsExceptionAsync <ValidationException>(
                async() => await target.GetUserInputAsync("Garbage"));

            Assert.AreEqual("Input Garbage not recognized.", exception.Message);
        }