public virtual void TestNextMatchingFailure() { object[] elements = new object[] { "foo", "bar" }; IQueue4 queue = NewQueue(elements); Assert.IsNull(queue.NextMatching(new _IPredicate4_42())); AssertNext(elements, queue); }
private void AssertNextMatching(object[] expectedAfterRemoval, object removedElement , object[] originalElements) { IQueue4 queue = NewQueue(originalElements); Assert.AreEqual(removedElement, queue.NextMatching(new _IPredicate4_73(removedElement ))); AssertNext(expectedAfterRemoval, queue); }
public virtual object NextMatching(IPredicate4 condition) { return(_queue.NextMatching(condition)); }