public void ValidatesEmptyFromName()
        {
            var options   = new MailServiceOptions();
            var validator = new MailServiceOptionsValidator();
            var result    = validator.Validate(options);
            var validated = result.Errors.Any(e =>
                                              e.PropertyName == nameof(MailServiceOptions.FromName) && e.ResourceName == NotEmptyValidator);

            Assert.IsTrue(validated);
        }
        public void ValidatesEmptyPasswordOnAuthenticate()
        {
            var options = new MailServiceOptions {
                Authenticate = true
            };
            var validator = new MailServiceOptionsValidator();
            var result    = validator.Validate(options);
            var validated = result.Errors.Any(e =>
                                              e.PropertyName == nameof(MailServiceOptions.Password) && e.ResourceName == NotEmptyValidator);

            Assert.IsTrue(validated);
        }
        public void ValidatesSmtpPort()
        {
            var options = new MailServiceOptions {
                SmtpPort = 0
            };
            var validator = new MailServiceOptionsValidator();
            var result    = validator.Validate(options);
            var validated = result.Errors.Any(e =>
                                              e.PropertyName == nameof(MailServiceOptions.SmtpPort) && e.ResourceName == GreaterThanValidator);

            Assert.IsTrue(validated);
        }