コード例 #1
0
        public void TestEnumerateWithInsufficientDatas2()
        {
            var source = Enumerable.Range(0, 100).ToArray();
            var from   = 95;
            var size   = 10;

            var expected = source.Length - from;
            int actual;

            var section = new PartitionSection <int>(source, from, size);

            actual = section.Count();
            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void TestCreateSectionWithSufficientDatas()
        {
            var source = Enumerable.Range(0, 100).ToArray();
            var from   = 0;
            var size   = 10;

            var expected = size;
            int actual;

            var section = new PartitionSection <int>(source, from, size);

            actual = section.Count();
            Assert.Equal(expected, actual);
        }