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);
        }
        public void Context()
        {
            _emailTemplate = A.Fake <EmailTemplate>();

            const int emailTemplateId         = 23;
            var       emailTemplateRepository = A.Fake <IRepository <EmailTemplate> >();

            A.CallTo(() => emailTemplateRepository.GetAsync(emailTemplateId)).Returns(_emailTemplate);

            _variablePartId   = 46;
            _emailTemplateDto = new EmailTemplateDto
            {
                EmailTemplateId = emailTemplateId,
            };
            var command = new DeleteVariableCommand
            {
                VariablePartId = _variablePartId,
                EmailTemplate  = _emailTemplateDto,
            };
            var handler = new DeleteVariableCommandHandler(emailTemplateRepository);

            handler.ExecuteAsync(command).Wait();
        }