示例#1
0
        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());
        }
示例#2
0
        public void CombiningEmptyWithAnythingShouldReturnTheOtherThing()
        {
            SelectedPropertiesNode.CombineNodes(EmptyNode, EmptyNode).Should().BeSameAsEmpty();

            SelectedPropertiesNode nonEmpty = SelectedPropertiesNode.Create("*");

            this.VerifyCombination(EmptyNode, nonEmpty, n => n.Should().BeSameAs(nonEmpty));
        }
示例#3
0
        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);
        }