第三个断言失败。它是 CouchbaseClient 错误吗?
private class StoreJsonTest
{
public int Id { get; set; }
public string StrProp { get; set; }
public int IntProp { get; set; }
}
[Test]
public void CouchBase()
{
var storeJsonTest = new StoreJsonTest() {Id = 1, StrProp = "Test str prop", IntProp = 10};
string key ="testStoreJson"+ Guid.NewGuid().ToString();
CouchbaseClient couchbaseClient = new CouchbaseClient();
couchbaseClient.StoreJson(StoreMode.Add, key, storeJsonTest);
var extractedJson = couchbaseClient.GetJson<StoreJsonTest>(key);
Assert.That(extractedJson.StrProp == storeJsonTest.StrProp);
Assert.That(extractedJson.IntProp == storeJsonTest.IntProp);
Assert.That(extractedJson.Id == storeJsonTest.Id);
}
如何将 Id 属性存储到 couchbase?