Пример #1
0
 public void GetDepthEmptyTest()
 {
     BinaryThree tree = new BinaryThree();
     int emptyThreeDepth = tree.GetMaxDepth();
     int zero = 0;
     Assert.AreEqual(zero, emptyThreeDepth);
 }
Пример #2
0
 public void GetDepthTwoBranchesTest()
 {
     BinaryThree twoBranchesTree = new BinaryThree() { Left = new BinaryThree(), Right = new BinaryThree() };
     twoBranchesTree.GetMaxDepth();
 }
Пример #3
0
 public void GetDepthOneBranchTest()
 {
     BinaryThree oneBranchTree = new BinaryThree() { Left = new BinaryThree() };
     int oneBranchThreeDepth = oneBranchTree.GetMaxDepth();
     Assert.AreEqual(1, oneBranchThreeDepth);
 }