Beispiel #1
0
        public void testDualFuncPipeFirstZero()
        {

            var _Strings = new List<String>();
            var _Numbers = Enumerable.Range(1, 10);
            var _Pipe = new FuncPipe<String, Int32, String>((A, B) => A + "-" + B);
            _Pipe.SetSourceCollection1(_Strings);
            _Pipe.SetSourceCollection2(_Numbers);

            var _Counter = 0;
            Assert.IsFalse(_Pipe.Any());
            Assert.AreEqual(_Counter, 0);
            Assert.IsFalse(_Pipe.Any());

        }
Beispiel #2
0
        public void testDualFuncPipeNormal()
        {

            var _Strings = new List<String>() { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
            var _Numbers = Enumerable.Range(1, 10);
            var _Pipe    = new FuncPipe<String, Int32, String>((A, B) => A + "-" + B);
            _Pipe.SetSourceCollection1(_Strings);
            _Pipe.SetSourceCollection2(_Numbers);

            var _Counter = 0;
            while (_Pipe.MoveNext())
            {
                Assert.AreEqual(_Pipe.Current, _Strings.ElementAt(_Counter) + "-" + _Numbers.ElementAt(_Counter));
                _Counter++;
            }

            Assert.AreEqual(_Counter, 10);

        }
Beispiel #3
0
        public void testDualFuncPipeSecondZero()
        {

            var _Strings = new List<String>() { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
            var _Numbers = new List<Int32>();
            var _Pipe = new FuncPipe<String, Int32, String>((A, B) => A + "-" + B);
            _Pipe.SetSourceCollection1(_Strings);
            _Pipe.SetSourceCollection2(_Numbers);

            var _Counter = 0;
            Assert.IsFalse(_Pipe.Any());
            Assert.AreEqual(_Counter, 0);
            Assert.IsFalse(_Pipe.Any());

        }