예제 #1
0
        public void Validate_MissingRecords_ReturnIsNotValid()
        {
            GoDaddyDomain domain = new GoDaddyDomain()
            {
                Name = "GoDaddy Domain",
            };

            IValidator <GoDaddyDomain> validator = new GoDaddyDomainValidator();

            ValidationResult result = validator.Validate(domain);

            Assert.False(result.IsValid);
        }
예제 #2
0
        public void Validate_MissingName_ReturnIsNotValid()
        {
            GoDaddyDomain domain = new GoDaddyDomain()
            {
                Records = CreateValidDNSRecordCollection()
            };

            IValidator <GoDaddyDomain> validator = new GoDaddyDomainValidator();

            ValidationResult result = validator.Validate(domain);

            Assert.False(result.IsValid);
        }
예제 #3
0
        public void Validate_ValidDomain_ReturnIsValid()
        {
            GoDaddyDomain domain = new GoDaddyDomain()
            {
                Name    = "GoDaddy Domain",
                Records = CreateValidDNSRecordCollection()
            };

            IValidator <GoDaddyDomain> validator = new GoDaddyDomainValidator();

            ValidationResult result = validator.Validate(domain);

            Assert.True(result.IsValid);
        }