コード例 #1
0
        public void DeletePost()
        {
            var post = PostHydrador.GetSingle();
            Bridge.Insert(post);

            Bridge.Delete(post.Id);
        }
コード例 #2
0
        public void UpdatePost()
        {
            var post = PostHydrador.GetSingle();

            Bridge.Insert(post);

            post.Title = "Changed title!";

            Bridge.Update(post.Id, post);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        public void InsertPost()
        {
            var post = PostHydrador.GetSingle();

            Bridge.Insert(post);
        }