Beispiel #1
0
        public void TryRemoveNullValue()
        {
            var    map = new ConcurrentBidirectionalMap <string, string>();
            string key;

            map.TryRemove("lala", null);
        }
Beispiel #2
0
        public void TryRemoveValueNull()
        {
            var    map = new ConcurrentBidirectionalMap <string, string>();
            string key;

            map.TryRemoveValue(null, out key);
        }
Beispiel #3
0
        public void TryRemoveNullKey()
        {
            var    map = new ConcurrentBidirectionalMap <string, string>();
            string key;

            map.TryRemove(null, "lala");
        }
Beispiel #4
0
        public void TryGetValueNull()
        {
            var    map = new ConcurrentBidirectionalMap <string, string>();
            string tmp;

            map.TryGetValue(null, out tmp);
        }
Beispiel #5
0
        private ConcurrentBidirectionalMap <int, char> CreateMap()
        {
            var map = new ConcurrentBidirectionalMap <int, char>();

            map.Store(1, 'a');
            map.Store(2, 'b');
            map.Store(3, 'c');
            return(map);
        }
Beispiel #6
0
        public void TryStoreNewTestMethod()
        {
            var map = new ConcurrentBidirectionalMap <int, char>();

            MapAlteration expected;
            MapAlteration actual;

            expected = MapAlteration.AddedKey | MapAlteration.AddedValue;
            actual   = map.Store(1, 'a');
            Assert.AreEqual(expected, actual, "Add new key/value pair (1=a)");

            expected = MapAlteration.AddedKey | MapAlteration.AddedValue;
            actual   = map.Store(2, 'b');
            Assert.AreEqual(expected, actual, "Add new key/value pair (2=b)");

            expected = MapAlteration.AddedKey | MapAlteration.AddedValue;
            actual   = map.Store(3, 'c');
            Assert.AreEqual(expected, actual, "Add new key/value pair (3=c)");

            Assert.AreEqual <int>(3, map.Count, "Number of entries");
            Assert.IsTrue(map.TestIntegrity());
        }
Beispiel #7
0
        public void ContainsNullKey()
        {
            var map = new ConcurrentBidirectionalMap <string, string>();

            map.Contains(null, "hello");
        }
Beispiel #8
0
        public void ContainsNullValue()
        {
            var map = new ConcurrentBidirectionalMap <string, string>();

            map.Contains("hello", null);
        }
Beispiel #9
0
        public void ContainsKeyNull()
        {
            var map = new ConcurrentBidirectionalMap <string, string>();

            map.ContainsKey(null);
        }
Beispiel #10
0
        public void TestTryStoreKeyNull()
        {
            var map = new ConcurrentBidirectionalMap <string, string>();

            map.TryStore(null, "hello");
        }
Beispiel #11
0
        public void TestTryStoreValueNull()
        {
            var map = new ConcurrentBidirectionalMap <string, string>();

            map.TryStore("hello", null);
        }