public void TestWaitForEmptyUnblocksWhenCollectionEmptied()
        {
            var collection = new DummySmtpServerConnectionCollection();
            var connection = Substitute.For <IDummySmtpServerConnection>();

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

            collection.Add(connection);
            collection.Remove(connection);
            Assert.That(collection.Count, Is.EqualTo(0));
        }