public void NotBuilder_Restore()
        {
            // Arrange
            var mockChain          = new BuilderAssemblerStub();
            var assemblerUnderTest = new NotBuilderAssembler(null)
            {
                Chain = mockChain
            };
            var dto = new NotBuilderDTO()
            {
                Label = "test",
                Other = BuilderAssemblerStub.DTO
            };

            // Act
            var restored = assemblerUnderTest.Restore(dto);

            // Assert
            Assert.IsNotNull(restored);
            Assert.IsInstanceOf <NotBuilder>(restored);
            var builder = (NotBuilder)restored;

            Assert.AreEqual(dto.Label, builder.Label);
            Assert.AreSame(BuilderAssemblerStub.Source, builder.Other);
        }
        public void NotBuilder_Restore()
        {
            // Arrange
            var mockOtherDTO = MockRepository.GenerateMock <ParameterBuilderDTO>();
            var mockOther    = MockRepository.GenerateMock <ParameterBuilder>();
            var mockChain    = MockRepository.GenerateMock <BuilderAssembler>((BuilderAssembler)null);

            mockChain.Expect(x => x.Restore(mockOtherDTO)).Return(mockOther);

            var assemblerUnderTest = new NotBuilderAssembler(null)
            {
                Chain = mockChain
            };
            var dto = new NotBuilderDTO()
            {
                Label = "test",
                Other = mockOtherDTO
            };

            // Act
            var restored = assemblerUnderTest.Restore(dto);

            // Assert
            Assert.IsNotNull(restored);
            Assert.IsInstanceOf <NotBuilder>(restored);
            var builder = (NotBuilder)restored;

            Assert.AreEqual(dto.Label, builder.Label);
            Assert.AreSame(mockOther, builder.Other);
            mockChain.VerifyAllExpectations();
        }