public void TestRescanWorks() { SimpleElementsContainer <int> testInst = new SimpleElementsContainer <int>(); try { for (int i = 0; i < 10; i++) { testInst.Add(i, new PoolOperations(), true); } testInst.ProcessAllElements(o => o.MarkElementDestroyed()); testInst.RescanContainer(); Assert.AreEqual(0, testInst.Count); Assert.AreEqual(0, testInst.AvailableCount); } finally { testInst.ProcessAllElements(o => o.MarkElementDestroyed()); } }