-
-
Save JakeGinnivan/2203309 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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