public void Addition_Tree_Depth_Is_Set_Correctly() { var input = new Addition { Left = new Constant(), Right = new Sinus() }; mUnderTest.SetTreeDepth(input); input.Should().BeOfType <Addition>().Which.TreeDepth.Should().Be(0); input.Should().BeOfType <Addition>().Which.Left.Should().BeOfType <Constant>().Which.TreeDepth.Should().Be(1); input.Should().BeOfType <Addition>().Which.Right.Should().BeOfType <Sinus>().Which.TreeDepth.Should().Be(1); }
public void Simple_One_Sided_Tree_Count_Is_Correct() { var input = new Addition() { Left = new Constant(), Right = new Constant() }; mSetter.SetTreeDepth(input); var result = mUnderTest.Evaluate(input); result.Should().Be(1); }