Skip to content

Instantly share code, notes, and snippets.

@johnsheehan
Created February 4, 2011 06:39
Show Gist options
  • Save johnsheehan/810817 to your computer and use it in GitHub Desktop.
Save johnsheehan/810817 to your computer and use it in GitHub Desktop.
[TestMethod]
public void Can_Generate_Single_Say_With_Shortcut()
{
var response = new TwilioResponse();
response.Say("Hello world");
var expected = XDocument.Parse("<Response><Say>Hello world</Say></Response>").ToString();
var actual = response.ToString();
Assert.AreEqual(expected, actual);
}
[TestMethod]
public void Can_Generate_Single_Say_With_Shortcut_And_Attributes()
{
var response = new TwilioResponse();
response.Say("Hello world", new { language = "en" });
var expected = XDocument.Parse("<Response><Say language=\"en\">Hello world</Say></Response>").ToString();
var actual = response.ToString();
Assert.AreEqual(expected, actual);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment