public void TestWaitForEmptyBlocksOnNonEmptyCollection() { var collection = new DummySmtpServerConnectionCollection(); var connection = Substitute.For <IDummySmtpServerConnection>(); collection.Add(connection); Assert.False(collection.WaitTillEmpty(250)); }
public void TestWaitForEmptyUnblocksWhenCollectionEmptied() { var collection = new DummySmtpServerConnectionCollection(); var connection = Substitute.For <IDummySmtpServerConnection>(); collection.Add(connection); collection.Remove(connection); Assert.True(collection.WaitTillEmpty()); }
public void TestWaitForEmptyOnNewCollection() { var collection = new DummySmtpServerConnectionCollection(); Assert.True(collection.WaitTillEmpty()); }