public void Context()
        {
            _emailTemplate = MockRepository.GenerateMock<EmailTemplate>();

            const int emailTemplateId = 23;
            var emailTemplateRepository = MockRepository.GenerateStub<IRepository<EmailTemplate>>();
            emailTemplateRepository.Stub(a => a.GetById(emailTemplateId)).Return(_emailTemplate);

            _variablePartId = 46;
            _emailTemplateDto = new EmailTemplateDto
                                    {
                                        EmailTemplateId = emailTemplateId,
                                    };
            var command = new DeleteVariableCommand
                              {
                                  VariablePartId = _variablePartId,
                                  EmailTemplate = _emailTemplateDto,
                              };
            var handler = new DeleteVariableCommandHandler(emailTemplateRepository);
            handler.Execute(command);
        }
Example #2
0
 public void DeleteVariable(DeleteVariableCommand command)
 {
     _commandExecutor.Execute(command);
 }