Browse files

add test for persisting properties.

  • Loading branch information...
1 parent af791ec commit c16f640e24ed2c534fb926b2cc828590f08e3b7f @soitgoes committed Oct 4, 2011
Showing with 13 additions and 1 deletion.
  1. +13 −1 LoveSeat.IntegrationTest/CouchClientTest.cs
View
14 LoveSeat.IntegrationTest/CouchClientTest.cs
@@ -155,6 +155,18 @@ public void Should_Return_Etag_In_ViewResults()
ViewResult result = db.GetAllDocuments();
Assert.IsTrue(!string.IsNullOrEmpty(result.Etag));
}
+
+ [Test]
+ public void Should_Persist_Property()
+ {
+ var db = client.GetDatabase(baseDatabase);
+ var company = new Company();
+ company.Id = "1234";
+ company.Name = "Whiteboard-IT";
+ db.CreateDocument(company);
+ var doc = db.GetDocument<Company>("1234");
+ Assert.AreEqual(company.Name, doc.Name);
+ }
[Test]
public void Should_Get_304_If_ETag_Matches()
{
@@ -174,7 +186,7 @@ public void Should_Get_Id_From_Existing_Document()
Assert.AreEqual(id, doc.Id);
}
}
- public class Company
+ public class Company :Document
{
public string Name { get; set; }
}

0 comments on commit c16f640

Please sign in to comment.