コード例 #1
0
        public void ClearList()
        {
            var proxy      = new ListProxy(Enumerable.Range(0, 100).ToList());
            var enumerator = proxy.GetEnumerator();

            enumerator.MoveNext();
            enumerator.MoveNext();

            proxy.Clear();

            Assert.AreEqual(100, proxy.Count);
            Assert.That(() => enumerator.MoveNext(), Throws.InvalidOperationException);
        }