예제 #1
0
        public void CopyItemPropertyParameters_defaults_to_null()
        {
            // ARRANGE
            var destinationNode = new LeafNode("name", ServiceProvider());

            // ACT
            var result = destinationNode.CopyItemPropertyParameters("sourcePath", "sourceProperty", "destinationPath", "destinationProperty");

            // ASSERT
            Assert.Null(result);
        }
예제 #2
0
        public void CopyItemPropertyParameters_invokes_underlying()
        {
            // ARRANGE
            var parameters       = new object();
            var copyItemProperty = this.mocks.Create <ICopyItemProperty>();

            copyItemProperty
            .Setup(sip => sip.CopyItemPropertyParameters("sourcePath", "sourceProperty", "destinationPath", "destinationProperty"))
            .Returns(parameters);

            var destinationNode = new LeafNode("name", ServiceProvider(With <ICopyItemProperty>(copyItemProperty)));

            // ACT
            var result = destinationNode.CopyItemPropertyParameters("sourcePath", "sourceProperty", "destinationPath", "destinationProperty");

            // ASSERT
            Assert.Same(parameters, result);
        }