public void Context()
        {
            var template = EmailTemplateBuilder.New.Build();
            var state = MockRepository.GenerateMock<EmailState>();
            state.Stub(a => a.CanSend).Return(true);
            var email = new EmailBuilder()
                .WithEmailTemplate(template)
                .WithState(state)
                .WithRecipient(new Recipient("email", "name"))
                .Build();

            _exception = Should.Throw<CoreException>(() => email.EnqueueEmailToBeSent(null, null, null));
        }
 public void Context()
 {
     var template = EmailTemplateBuilder.New
         .WithInitialHtml("12345")
         .Build();
     const int emailId = 78;
     var email = new EmailBuilder()
         .WithId(56)
         .WithEmailTemplate(template)
         .Build();
     var emailDto = new EmailDto {EmailId = emailId};
     _exception = Should.Throw<CoreException>(() => email.UpdateVariables(emailDto));
 }