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

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

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

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

            map.TryGetValue(null, out tmp);
        }
コード例 #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);
        }
コード例 #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());
        }
コード例 #7
0
        public void ContainsNullKey()
        {
            var map = new ConcurrentBidirectionalMap <string, string>();

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

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

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

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

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