public void DeletePost() { var post = PostHydrador.GetSingle(); Bridge.Insert(post); Bridge.Delete(post.Id); }
public void UpdatePost() { var post = PostHydrador.GetSingle(); Bridge.Insert(post); post.Title = "Changed title!"; Bridge.Update(post.Id, post); }
public void GetPost() { var post = PostHydrador.GetSingle(); Bridge.Insert(post); var receivedPost = Bridge.Get <Post>(post.Id); Assert.IsNotNull(receivedPost); Assert.AreEqual(post.Id, receivedPost.Id); }
public void UpdatePost() { var post = PostHydrador.GetSingle(); Bridge.Insert(post); post.Title = "Changed title!"; Bridge.Update(post.Id, post); post = Bridge.Get(post.Id) as Post; Assert.AreEqual("Changed title!", post.Title); }
public void UpdatePostUpdatesIndexes() { var post = PostHydrador.GetSingle(); Bridge.Insert(post); post.Title = "Changed title!"; Bridge.Update(post.Id, post); var match = Bridge.Query<Post>() .Filter(new Eq(new Field("Title"), new Literal("Changed title!"))) .Count(); Assert.AreEqual(1, match); }
public void InsertPost() { var post = PostHydrador.GetSingle(); Bridge.Insert(post); }