Beispiel #1
0
        public void ShouldGetMissingString()
        {
            var k = "test-datafabric-doesnotexist";

            var fabric = new DataFabric(_redis, _keyProvider, _valueProvider);

            var o = fabric.Observe <string, string>(k);
            var s = o.FirstOrDefault();

            StringAssert.AreEqualIgnoringCase(string.Empty, s);
        }
Beispiel #2
0
        public void ShouldPutString()
        {
            var v = "teststring";
            var k = "test-datafabric";

            var fabric = new DataFabric(_redis, _keyProvider, _valueProvider);


            fabric.Put(k, v);
            //var r = _redis.GetDatabase().StringGet(k);
            //StringAssert.AreEqualIgnoringCase(v, r.ToString());
            var o = fabric.Observe <string, string>(k);
            var s = o.FirstOrDefault();

            StringAssert.AreEqualIgnoringCase(v, s);
        }