public void CombiningEntireSubtreeWithAnythingShouldReturnEntireSubtree() { SelectedPropertiesNode.CombineNodes(EntireSubtreeNode, EntireSubtreeNode).Should().HaveEntireSubtree(); this.VerifyCombination(EmptyNode, EntireSubtreeNode, n => n.Should().HaveEntireSubtree()); this.VerifyCombination(SelectedPropertiesNode.Create("*"), EntireSubtreeNode, n => n.Should().HaveEntireSubtree()); }
public void CombiningEmptyWithAnythingShouldReturnTheOtherThing() { SelectedPropertiesNode.CombineNodes(EmptyNode, EmptyNode).Should().BeSameAsEmpty(); SelectedPropertiesNode nonEmpty = SelectedPropertiesNode.Create("*"); this.VerifyCombination(EmptyNode, nonEmpty, n => n.Should().BeSameAs(nonEmpty)); }
private void VerifyCombination(SelectedPropertiesNode left, SelectedPropertiesNode right, Action <SelectedPropertiesNode> verify) { var result = SelectedPropertiesNode.CombineNodes(left, right); verify(result); result = SelectedPropertiesNode.CombineNodes(right, left); verify(result); }