public void CanUseMultiple()
        {
            EmailDriverManager newDriver = new EmailDriverManager(() => EmailDriverMocks.GetMoq().Object, this.TestObject);

            this.ManagerStore.Add("test", newDriver);

            Assert.AreNotEqual(this.TestObject.EmailManager, this.ManagerStore.GetManager <EmailDriverManager>("test"));
            Assert.AreNotEqual(this.TestObject.EmailManager.Get(), (this.ManagerStore.GetManager <EmailDriverManager>("test")).Get());
        }
 public void CanLazyOverrideEmailDriver()
 {
     this.TestObject.EmailManager.OverrideDriver(() => EmailDriverMocks.GetMoq().Object);
     Assert.AreEqual(false, this.TestObject.EmailManager.IsDriverIntialized(), "Did not expect the driver to be initialized");
     Assert.AreEqual(this.TestObject.EmailManager.GetEmailDriver().EmailConnection, EmailDriver.EmailConnection);
 }
        public void CanOverrideEmailDriver()
        {
            this.TestObject.EmailManager.OverrideDriver(() => EmailDriverMocks.GetMoq().Object);

            Assert.AreEqual(this.TestObject.EmailManager.GetEmailDriver().EmailConnection, EmailDriver.EmailConnection);
        }
 public void SetupMoqDriver()
 {
     this.TestObject.OverrideEmailClient(() => EmailDriverMocks.GetMoq().Object);
 }
Exemple #5
0
 public void DownloadAttachmentsError()
 {
     EmailDriver.DownloadAttachments(EmailDriverMocks.GetMocMime());
 }
Exemple #6
0
 public void DownloadAttachmentsToError()
 {
     EmailDriver.DownloadAttachments(EmailDriverMocks.GetMocMime(), string.Empty);
 }
Exemple #7
0
 public void GetMimeAttachmentsError()
 {
     EmailDriver.GetAttachments(EmailDriverMocks.GetMocMime());
 }