I am running the test cases provided by Twilio:
https://www.twilio.com/docs/voice/tutorials/ivr-phone-tree-csharp-mvc
All the tests of fail because the code throws an exception:
System.MissingMethodException HResult=0x80131513 Message=Method not found: 'Void Twilio.TwiML.Voice.Gather..ctor(System.Collections.Generic.List, System.Uri, Twilio.Http.HttpMethod, System.Nullable, System.String, System.Nullable, System.Nullable, System.String, System.Nullable, System.Uri, Twilio.Http.HttpMethod, LanguageEnum, System.String, System.Nullable, System.Nullable)
Here's an example of failing test case
public void GivenAWelcomeAction_ThenTheResponseContainsGatherPlay()
{
var controllerPropertiesMock = new ControllerPropertiesMock();
var controller = new IVRController
{
ControllerContext = controllerPropertiesMock.ControllerContext,
Url = controllerPropertiesMock.Url(RouteConfig.RegisterRoutes)
};
controller.WithCallTo(c => c.Welcome())
.ShouldReturnTwiMLResult(data =>
{
Assert.That(data.XPathSelectElement("Response/Gather/Say"), Is.Not.Null);
Assert.That(data.XPathSelectElement("Response/Gather").Attribute("action").Value,
Is.EqualTo("/Menu/Show"));
});
}
Any suggestions as to how to avoid the exception?
User contributions licensed under CC BY-SA 3.0