public Post PostBPost(Post p) { p.Id = RavenSession.Query<Post>().Count()+1; RavenSession.Store(p); RavenSession.SaveChanges(); return p; }
public void Add_Numbers_SumTheNumber() { Post p = new Post(); p.Id = 1; p.PostedOn = DateTime.Now; p.Text = "siddaraju"; PostController pc = new PostController(); pc.RavenSession = _session; Post postedPost = pc.PostBPost(p); Assert.IsNull(postedPost, "postedPost is NULL"); }