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); }
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()); }
public void TestStoreKeyNull() { var map = new ConcurrentBidirectionalMap <string, string>(); map.Store(null, "hello"); }
public void TestStoreValueNull() { var map = new ConcurrentBidirectionalMap <string, string>(); map.Store("hello", null); }