public void RemoveTest() { ThreadLogContext target = Log.ThreadContext; string key = "RemoveTest"; target[key] = 1; Assert.AreEqual(true, target.ContainsKey(key)); target.Remove(key); Assert.AreEqual(false, target.ContainsKey(key)); }
public void ClearTest() { ThreadLogContext target = Log.ThreadContext; string key = "ClearTest"; target[key] = 1; target.Clear(); Assert.AreEqual(false, target.ContainsKey(key)); }
public void PushTest() { ThreadLogContext target = Log.ThreadContext; string key = "PushTest"; object value = "PushedValue"; using (target.Push(key, value)) { object actual = target[key]; Assert.AreEqual(value, actual); } Assert.IsFalse(target.ContainsKey(key)); }