Exemplo n.º 1
0
        public void TestSliceListOptimization()
        {
            const int sliceStart = 4;
            const int sliceCount = 3;
            var sequence = new UnenumerableList<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            var result = sequence.Slice(sliceStart, sliceCount);

            Assert.AreEqual(sliceCount, result.Count());
            Assert.IsTrue(result.SequenceEqual(Enumerable.Range(5, sliceCount)));
        }
Exemplo n.º 2
0
 public void AtLeastShouldBeNotEnumerateSequenceForImplementersOfICollection()
 {
     var sequence = new UnenumerableList<int>();
     sequence.AtLeast(3);
 }