コード例 #1
0
        public void CopyingCharacterNodeShouldCopyOriginalCharacter()
        {
            // Arrange
            var target = new CharacterNode('a');

            // Act
            // RemoveNode returns a copy of the current node.
            var result = target.RemoveNode(new CharacterNode('x'));

            // Assert
            CharacterNode characterNode = result.ShouldBeOfType <CharacterNode>();

            characterNode.Character.ShouldBe(target.Character);
        }