public void TryAddPresent() { var ocd = new OrderedConcurrentDictionary <int, string>(); ocd.TryAdd(1, "one"); Assert.False(ocd.TryAdd(1, "not one")); Assert.Equal("one", ocd[1]); }
public void TryAddNotPresent() { var ocd = new OrderedConcurrentDictionary <int, string>(); Assert.True(ocd.TryAdd(1, "one")); }