Exemple #1
0
        public void ClearMethodIsReadonlyException()
        {
            var testList = new ListCollection <int> {
                1, 2
            };

            testList = testList.ReadOnlyList();
            Assert.Throws <NotSupportedException>(() => testList.Clear());
        }
Exemple #2
0
        public void ValidatesClearMethod()
        {
            var test = new ListCollection <int> {
                5, 3
            };

            test.Clear();
            Assert.Empty(test);
        }