Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        public void CanOverrideEmailDriver()
        {
            this.TestObject.EmailManager.OverrideDriver(() => EmailDriverMocks.GetMoq().Object);

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