Пример #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);
        }