Example #1
0
        public async Task Delete_Object_Success()
        {
            MongoService repo = new MongoService(_mongoFixture.MongoClient, _mongoFixture.Logger, new Dictionary <string, HashSet <string> >());
            string       json = "{ \"Name\" : \"Maria\" }";

            var insertResult = await repo.InsertAsync("bookstore", "users", "3", json);

            var getResult = await repo.GetAsync("bookstore", "users", "3");

            var deleteResult = await repo.DeleteAsync("bookstore", "users", "3");

            var getResultAfterDelete = await repo.GetAsync("bookstore", "users", "3");

            Assert.Null(getResultAfterDelete);
            Assert.True(deleteResult);
        }