public void TestDocumentGetByFieldsSync() { DataDocument doc = new DataDocument(); doc.Set("field1", "value1"); redis.PutSync("unit-test-hash", "1", doc); Assert.AreEqual(doc.GetFirstValueAsString("field1"), (redis.GetSync("unit-test-hash", "1", new string[] { "field1" })).GetFirstValueAsString("field1")); }
public void TestSyncPut() { DataDocument doc = new DataDocument(); doc.Set("field1", "value1"); redis.PutSync("unit-test", "1", doc, TimeSpan.FromSeconds(600)); Assert.AreEqual(doc.GetFirstValueAsString("field1"), (redis.GetSync("unit-test", "1")).GetFirstValueAsString("field1")); }
public async Task TestDocumentPut() { DataDocument doc = new DataDocument(); doc.Set("field1", "value1"); await redis.Put("unit-test", "1", doc, TimeSpan.FromSeconds(600)); Assert.AreEqual(doc.GetFirstValueAsString("field1"), (await redis.Get("unit-test", "1")).GetFirstValueAsString("field1")); }
public async Task TestDocumentGetByFields() { DataDocument doc = new DataDocument(); doc.Set("field1", "value1"); await redis.Put("unit-test-hash", "1", doc); Assert.AreEqual(doc.GetFirstValueAsString("field1"), (await redis.Get("unit-test-hash", "1", new string[] { "field1" })).GetFirstValueAsString("field1")); }