Example #1
0
        public void GetValueByIndexTest(int index)
        {
            var collection = new AvoidingLargeObjectHeapReadOnlyCollection <int>(_getEnumerable(50000));

            Assert.Equal(index, collection[index]);
        }
Example #2
0
        public void GettingIndexOutOfRangeExceptionTest(int index)
        {
            var collection = new AvoidingLargeObjectHeapReadOnlyCollection <int>(_getEnumerable(50000));

            Assert.Throws <IndexOutOfRangeException>(() => collection[index]);
        }
Example #3
0
        public void CountTest(int count)
        {
            var collection = new AvoidingLargeObjectHeapReadOnlyCollection <int>(_getEnumerable(count));

            Assert.Equal(count, collection.Count);
        }