public void GetCommentsReturnsNullWhenPostHasOneComment() { var user = new NullPropagation.User(); user.Posts = new List<NullPropagation.Post> { new NullPropagation.Post { Id = 2 } }; var comments = user.GetComments(2); Assert.Null(comments); }
public void GetCommentsReturnsNullWhenPostIsNull() { var user = new NullPropagation.User(); var comments = user.GetComments(2); Assert.Null(comments); }
public void GetCommentsReturnsOneWhenPostHasOneComment() { var user = new NullPropagation.User(); user.Posts = new List<NullPropagation.Post>{ new NullPropagation.Post { Id = 2, Comments = new List<NullPropagation.Comment> { new NullPropagation.Comment() }}}; var comments = user.GetComments(2); Assert.Equal(1, comments.Value); }
public void GetCommentsReturnsNullWhenPostHasOneComment() { var user = new NullPropagation.User(); user.Posts = new List <NullPropagation.Post> { new NullPropagation.Post { Id = 2 } }; var comments = user.GetComments(2); Assert.Null(comments); }
public void GetCommentsReturnsOneWhenPostHasOneComment() { var user = new NullPropagation.User(); user.Posts = new List <NullPropagation.Post> { new NullPropagation.Post { Id = 2, Comments = new List <NullPropagation.Comment> { new NullPropagation.Comment() } } }; var comments = user.GetComments(2); Assert.Equal(1, comments.Value); }