コード例 #1
0
ファイル: Cell.cs プロジェクト: rachelbarnes/LinkedLists
        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);
        }
コード例 #2
0
ファイル: Cell.cs プロジェクト: rachelbarnes/LinkedLists
        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);
        }