Skip to content

Instantly share code, notes, and snippets.

@JakeGinnivan
Forked from shiftkey/gist:2203299
Created March 26, 2012 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JakeGinnivan/2203309 to your computer and use it in GitHub Desktop.
Save JakeGinnivan/2203309 to your computer and use it in GitHub Desktop.
[Fact]
public Task Fetch_WithBlogSelectedAndOneResult_DisplaysOnePost()
{
// arrange
var result = new[] { new Post() };
metaWeblogService
.GetRecentPostsAsync(Arg.Any<BlogSetting>(), Arg.Any<int>())
.Returns(()=>Task.Factory.FromResult(new []{new Post()});
subject.SelectedBlog = new BlogSetting();
// act
return subject
.Fetch()
.ContinueWith(t=>Assert.NotEmpty(subject.Posts));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment