Example #1
0
        public void CountRecTestParam()
        {
            var count    = new CellHelper <int>();
            var x        = new Cell <int>(1, new Cell <int>(2, new Cell <int>(4, new Cell <int>(7, new Cell <int>(8, null)))));
            var expected = 5;
            var actual   = count.CountCellRecwithParm(x);

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void RecursivePrintHelperFunction()
        {
            var count    = new CellHelper <int>();
            var x        = new Cell <int>(1, new Cell <int>(2, new Cell <int>(4, new Cell <int>(7, new Cell <int>(8, null)))));
            var expected = "1 -> 2 -> 4 -> 7 -> 8";
            var actual   = count.PrintCellStringRecWithParam(x);

            Assert.AreEqual(expected, actual);
        }