示例#1
0
 public void testVerifyTld()
 {
     try
     {
         TldVerify tldVerify = new TldVerify();
         assert.assertTrue(tldVerify.verifyTld("AERO."));
         assert.assertTrue(tldVerify.verifyTld("AERO"));
         assert.assertTrue(tldVerify.verifyTld("ICANN.ORG"));
         assert.assertTrue(tldVerify.verifyTld("icann.org"));
         //assert.assertFalse(tldVerify.verifyTld("SS"));
     }
     catch (Exception e)
     {
         throw new TLDVerifyException(e);
     }
 }
示例#2
0
 public void testVerifyTld()
 {
     try
     {
         TldVerify tldVerify = new TldVerify();
         assert.assertTrue(tldVerify.verifyTld("AERO."));
         assert.assertTrue(tldVerify.verifyTld("AERO"));
         assert.assertTrue(tldVerify.verifyTld("ICANN.ORG"));
         assert.assertTrue(tldVerify.verifyTld("icann.org"));
         //assert.assertFalse(tldVerify.verifyTld("SS"));
     }
     catch (Exception e)
     {
         throw new TLDVerifyException(e);
     }
 }
示例#3
0
        public void main(string[] args)
        {
            string domainName = args.Length > 0 ? args[0] : DEFAULT_DOMAIN;
            Console.WriteLine("Verifying domain " + domainName + " using DNS protocol ");
            TldVerify verify = new TldVerify();
            bool b = verify.verifyTld(domainName);
            Console.WriteLine("The result is " + b);
            Console.WriteLine("Verifying domain " + domainName + " using Offline method");

            try
            {
                bool b1 = verify.verifyTldOffline(domainName);
                Console.WriteLine("The result is " + b1);
            }
            catch (TLDVerifyException e)
            {
                Console.WriteLine("Exception " + e.Message);
            }
            Console.WriteLine("\nEnter test to execute test routines");
        }
示例#4
0
        public void main(string[] args)
        {
            string domainName = args.Length > 0 ? args[0] : DEFAULT_DOMAIN;

            Console.WriteLine("Verifying domain " + domainName + " using DNS protocol ");
            TldVerify verify = new TldVerify();
            bool      b      = verify.verifyTld(domainName);

            Console.WriteLine("The result is " + b);
            Console.WriteLine("Verifying domain " + domainName + " using Offline method");

            try
            {
                bool b1 = verify.verifyTldOffline(domainName);
                Console.WriteLine("The result is " + b1);
            }
            catch (TLDVerifyException e)
            {
                Console.WriteLine("Exception " + e.Message);
            }
            Console.WriteLine("\nEnter test to execute test routines");
        }