Ejemplo n.º 1
0
        public void Should_update_an_existing_document()
        {
            var documentDb = new DocSharp(DbName);
            var document = documentDb.Store(new Company { Name = "My Company" });
            document.Data.Name = "Updated";
            documentDb.Update(document);
            documentDb.Dispose();

            using(var documentDb2 = new DocSharp(DbName))
            {
                var foundDocument = documentDb2.Load<Company>(document.Id);
                Assert.AreEqual(foundDocument.Data.Name, "Updated");
            }
        }