Skip to content

Instantly share code, notes, and snippets.

@theorigin
Created August 4, 2012 15:08
Show Gist options
  • Save theorigin/3258269 to your computer and use it in GitHub Desktop.
Save theorigin/3258269 to your computer and use it in GitHub Desktop.
Json TDD Unit Test
[Test]
public void SomeTest()
{
var viewResult = this.controller.Index(new InputModelBuilder().Build()) as JsonResult;
viewResult.Should().NotBeNull();
var data = viewResult.Data;
var pageNumber = data.GetType().GetProperty("page").GetValue(data, null);
pageNumber.Should().Be(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment