public void InstanceHasPassedInHost()
        {
            var host           = "mail.domain.tld";
            var smtpClientWrap = new SmtpClientWrap(host);

            Assert.AreEqual(host, smtpClientWrap.Instance.Host);
        }
        public void InstanceIsPassedInObject()
        {
            var concreteClient = new SmtpClient();
            var smtpClientWrap = new SmtpClientWrap(concreteClient);

            Assert.AreEqual(concreteClient, smtpClientWrap.Instance);
        }
        public void EventIsCalled()
        {
            bool wasCalled      = false;
            var  smtpClientWrap = new SmtpClientWrap();

            smtpClientWrap.SendCompleted += (o, args) => { wasCalled = true; };

            smtpClientWrap.SendCompletedHandler(null, null);
            Assert.IsTrue(wasCalled);
        }
        public void CredentialsAreInstanceCredentials()
        {
            var creds          = new NetworkCredential("user1", "password1");
            var smtpClientWrap = new SmtpClientWrap {
                Credentials = creds
            };

            Assert.AreEqual(creds, smtpClientWrap.Instance.Credentials);
            Assert.AreEqual(creds, smtpClientWrap.Credentials);
        }
        public void InstanceIsNotNull()
        {
            var smtpClientWrap = new SmtpClientWrap();

            Assert.IsNotNull(smtpClientWrap.Instance);
        }