Ejemplo n.º 1
0
        public void TestGetEnumerator()
        {
            var hl = new Hyperloop <int>(recursion => RecursiveRange_Impl(recursion, 0, 10));

            var enumerator = hl.GetEnumerator();

            Assert.Equal(default, enumerator.Current);
Ejemplo n.º 2
0
        public void TestConstructor()
        {
            {
                var hl = new Hyperloop <int>(recursion => RecursiveRange_Impl(recursion, 0, 10));
                //Assert.NotNull(hl.EnumerableImplementation);
                //Assert.Null(hl.EnumeratorImplementation);
                //Assert.True(hl.Depth < 0);
            }

            {
                var hl = new Hyperloop <int>(recursion => RecursiveRange_Impl(recursion, 0, 10).GetEnumerator());
                //Assert.Null(hl.EnumerableImplementation);
                //Assert.NotNull(hl.EnumeratorImplementation);
                //Assert.True(hl.Depth < 0);
            }

            {
                var hl = new Hyperloop <int>(recursion => RecursiveRange_Impl(recursion, 0, 10), 10);
                //Assert.NotNull(hl.EnumerableImplementation);
                //Assert.Null(hl.EnumeratorImplementation);
                //Assert.Equal(10, hl.Depth);
            }

            {
                var hl = new Hyperloop <int>(recursion => RecursiveRange_Impl(recursion, 0, 10).GetEnumerator(), 10);
                //Assert.Null(hl.EnumerableImplementation);
                //Assert.NotNull(hl.EnumeratorImplementation);
                //Assert.Equal(10, hl.Depth);
            }
        }