コード例 #1
0
        public void ChangeDescriptionCommand()
        {
            var sutBuilder = new ProductCommandBuilder <ChangeDescriptionOfProductCommand>();
            var sut        = sutBuilder.Build() as ChangeDescriptionOfProductCommand;

            sut.Description = "New description";
            sut.Execute();

            sutBuilder.ProductMock.Verify(s => s.ChangeDescription(sut.Description), Times.Once);
        }
コード例 #2
0
        public void ChangeBusinessCaseCommand()
        {
            var sutBuilder = new ProductCommandBuilder <ChangeBusinessCaseOfProductCommand>();
            var sut        = sutBuilder.Build() as ChangeBusinessCaseOfProductCommand;

            sut.BusinessCase = "New business case";
            sut.Execute();

            sutBuilder.ProductMock.Verify(s => s.ChangeBusinessCase(sut.BusinessCase), Times.Once);
        }
コード例 #3
0
        public void RenameCommand()
        {
            var sutBuilder = new ProductCommandBuilder <RenameProductCommand>();
            var sut        = sutBuilder.Build() as RenameProductCommand;

            sut.OriginalName = "Old name";
            sut.Name         = "New name";
            sut.Execute();

            sutBuilder.ProductMock.Verify(s => s.Rename(sut.Name, sut.OriginalName), Times.Once);
        }