ConferenceBroadcast.Web.Controllers.ConferenceController.Join C# (CSharp) Method

Join() private method

private Join ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
        public ActionResult Join()
        {
            var response = new TwilioResponse();
            response.Say("You are about to join the Rapid Response conference");
            response.BeginGather(new {action = @Url.Action("Connect")})
                .Say("Press 1 to join as a listener")
                .Say("Press 2 to join as a speaker")
                .Say("Press 3 to join as the moderator")
                .EndGather();

            return TwiML(response);
        }

Usage Example

        public void GivenAJoinAction_ThenTheResponseContainsAGatherVerb()
        {
            var controller = new ConferenceController {Url = Url};
            var result = controller.Join();

            result.ExecuteResult(MockControllerContext.Object);
            var document = BuildDocument();

            Assert.That(document.SelectSingleNode("Response/Gather").Attributes["action"].Value,
                Is.EqualTo("/Conference/Connect"));
        }