public void HashStack_PushSameItem_ReturnsFalse() { var s = new HashStack<int>(); s.Push(1); var added = s.Push(1); Assert.False(added); }
/// <summary> /// Initializes a new instance of the <see cref="CSharp.Locking.LockCondition"/> class. /// </summary> /// <param name="signalId">Signal identifier used to notify waiting threads which condition was statisfied.</param> /// <param name="monitor">The <c>LockMonitor</c> used in the parent lock.</param> public LockCondition(string signalId, LockMonitor monitor) { _signalId = signalId; _monitor = monitor; _waitingThreads = new HashSet<string>(); _threadSignals = new HashStack<string, string>(); }
public void HashStack_PopWithNoElements_Throws() { var s = new HashStack <int>(); Assert.ThrowsException <InvalidOperationException>(() => s.Pop()); }
public void HashStack_PopWithNoElements_Throws() { var s = new HashStack<int>(); Assert.Throws<InvalidOperationException>(()=> s.Pop()); }
public void HashStack_ContainsTest() { var s = new HashStack<int>(); s.Push(5); Assert.Equal(true, s.Contains(5)); }
public void HashStack_PopWithNoElements_Throws() { var s = new HashStack<int>(); s.Pop(); }
public void HashStack_PopWithNoElements_Throws() { var s = new HashStack <int>(); s.Pop(); }