Inheritance: IIdentifiedDataSerializable, IEntryProcessor
Ejemplo n.º 1
0
        public virtual void TestSubmitToKey_nullKey()
        {
            const string key            = null;
            const string value          = "value10";
            var          entryProcessor = new IdentifiedEntryProcessor(value);

            map.SubmitToKey(key, entryProcessor);
        }
Ejemplo n.º 2
0
        public virtual void TestExecuteOnKeys_keysNotNull()
        {
            FillMap();
            ISet <object> keys           = null;
            const string  value          = "valueX";
            var           entryProcessor = new IdentifiedEntryProcessor(value);

            map.ExecuteOnKeys(keys, entryProcessor);
        }
Ejemplo n.º 3
0
        public virtual void TestExecuteOnKey_nullKey()
        {
            FillMap();
            const string key            = null;
            const string value          = "value10";
            var          entryProcessor = new IdentifiedEntryProcessor(value);

            map.ExecuteOnKey(key, entryProcessor);
        }
 public void TestSubmitToKey_nullKey()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         const string key   = null;
         const string value = "value10";
         var entryProcessor = new IdentifiedEntryProcessor(value);
         map.SubmitToKey(key, entryProcessor);
     });
 }
        public virtual void TestExecuteOnKeys_keysEmpty()
        {
            FillMap();
            ISet <object> keys           = new HashSet <object>();
            const string  value          = "valueX";
            var           entryProcessor = new IdentifiedEntryProcessor(value);
            var           result         = map.ExecuteOnKeys(keys, entryProcessor);

            Assert.AreEqual(result.Count, 0);
        }
 public void TestExecuteOnKeys_keysNotNull()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         FillMap();
         ISet <object> keys = null;
         const string value = "valueX";
         var entryProcessor = new IdentifiedEntryProcessor(value);
         map.ExecuteOnKeys(keys, entryProcessor);
     });
 }
 public void TestExecuteOnKey_nullKey()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         FillMap();
         const string key   = null;
         const string value = "value10";
         var entryProcessor = new IdentifiedEntryProcessor(value);
         map.ExecuteOnKey(key, entryProcessor);
     });
 }
        public virtual void TestSubmitToKey()
        {
            FillMap();
            const string key            = "key1";
            const string value          = "value10";
            var          entryProcessor = new IdentifiedEntryProcessor(value);
            var          task           = map.SubmitToKey(key, entryProcessor);

            Assert.AreEqual(task.Result, value);
            Assert.AreEqual(task.Result, map.Get(key));
        }
        public virtual void TestExecuteOnKey()
        {
            FillMap();
            const string key            = "key1";
            const string value          = "value10";
            var          entryProcessor = new IdentifiedEntryProcessor(value);
            var          result         = map.ExecuteOnKey(key, entryProcessor);

            Assert.AreEqual(result, value);
            Assert.AreEqual(result, map.Get(key));
        }
        public virtual void TestExecuteOnEntries()
        {
            FillMap();
            const string value          = "valueX";
            var          entryProcessor = new IdentifiedEntryProcessor(value);
            var          result         = map.ExecuteOnEntries(entryProcessor);

            foreach (var resultKV in result)
            {
                Assert.AreEqual(resultKV.Value, value);
                Assert.AreEqual(value, map.Get(resultKV.Key));
            }
        }
        public virtual void TestExecuteOnEntriesWithPredicate()
        {
            FillMap();
            const string value          = "valueX";
            var          entryProcessor = new IdentifiedEntryProcessor(value);
            var          result         = map.ExecuteOnEntries(entryProcessor, Predicates.Sql("this == value5"));

            Assert.AreEqual(result.Count, 1);
            foreach (var resultKV in result)
            {
                Assert.AreEqual(resultKV.Value, value);
                Assert.AreEqual(value, map.Get(resultKV.Key));
            }
        }
        public virtual void TestExecuteOnKeys()
        {
            FillMap();
            var keys = new HashSet <object> {
                "key1", "key5"
            };
            const string value          = "valueX";
            var          entryProcessor = new IdentifiedEntryProcessor(value);
            var          result         = map.ExecuteOnKeys(keys, entryProcessor);

            foreach (var resultKV in result)
            {
                Assert.AreEqual(resultKV.Value, value);
                Assert.AreEqual(value, map.Get(resultKV.Key));
            }
        }
 public virtual void TestExecuteOnKey()
 {
     FillMap();
     const string key = "key1";
     const string value = "value10";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     var result = map.ExecuteOnKey(key, entryProcessor);
     Assert.AreEqual(result, value);
     Assert.AreEqual(result, map.Get(key));
 }
 public virtual void TestSubmitToKey_nullKey()
 {
     const string key = null;
     const string value = "value10";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     map.SubmitToKey(key, entryProcessor);
 }
 public virtual void TestExecuteOnEntries()
 {
     FillMap();
     const string value = "valueX";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     var result = map.ExecuteOnEntries(entryProcessor);
     foreach (var resultKV in result)
     {
         Assert.AreEqual(resultKV.Value, value);
         Assert.AreEqual(value, map.Get(resultKV.Key));
     }
 }
 public virtual void TestExecuteOnKey_nullKey()
 {
     FillMap();
     const string key = null;
     const string value = "value10";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     map.ExecuteOnKey(key, entryProcessor);
 }
 public virtual void TestExecuteOnKeys_keysNotNull()
 {
     FillMap();
     ISet<object> keys = null;
     const string value = "valueX";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     map.ExecuteOnKeys(keys, entryProcessor);
 }
 public virtual void TestExecuteOnKeys_keysEmpty()
 {
     FillMap();
     ISet<object> keys = new HashSet<object>();
     const string value = "valueX";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     var result = map.ExecuteOnKeys(keys, entryProcessor);
     Assert.AreEqual(result.Count, 0);
 }
 public virtual void TestExecuteOnKeys()
 {
     FillMap();
     var keys = new HashSet<object> {"key1", "key5"};
     const string value = "valueX";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     var result = map.ExecuteOnKeys(keys, entryProcessor);
     foreach (var resultKV in result)
     {
         Assert.AreEqual(resultKV.Value, value);
         Assert.AreEqual(value, map.Get(resultKV.Key));
     }
 }
 public virtual void TestSubmitToKey()
 {
     FillMap();
     const string key = "key1";
     const string value = "value10";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     var task = map.SubmitToKey(key, entryProcessor);
     Assert.AreEqual(task.Result, value);
     Assert.AreEqual(task.Result, map.Get(key));
 }
 public virtual void TestExecuteOnEntriesWithPredicate()
 {
     FillMap();
     const string value = "valueX";
     var entryProcessor = new IdentifiedEntryProcessor(value);
     var result = map.ExecuteOnEntries(entryProcessor, Predicates.Sql("this == value5"));
     Assert.AreEqual(result.Count, 1);
     foreach (var resultKV in result)
     {
         Assert.AreEqual(resultKV.Value, value);
         Assert.AreEqual(value, map.Get(resultKV.Key));
     }
 }