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);
}
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")); }