コード例 #1
0
 @Test
 public void testgetForwardMappings() {
   try {
     List<FandRMapping> fMappings = dbDao.getForwardAMappings("bcs.com");
     for (FandRMapping f : fMappings) {
       Map<Integer, String> iPAddressesFandR = dbDao.getIPAddressesFandR(f);
       List<String> ipAddresses = new ArrayList<String>(iPAddressesFandR.values());
       for (String ipaddr : ipAddresses) {
         System.out.println(ipaddr);
         assertNotNull(ipAddresses);
       }
     }
     db.close();
   } catch (Exception ex) {
     System.err.println(ex.getMessage());
   }
 }
コード例 #2
0
 @Test
 public void testFandRMappings() {
   try {
     List<FandRMapping> fandRMappings = dbDao.getFandRMappings("bcs.com");
     for (FandRMapping fr : fandRMappings) {
       assertNotNull(fr.gethostName());
       System.out.println(fr.gethostName());
       Map<Integer, String> iPAddressesFandR = dbDao.getIPAddressesFandR(fr);
       List<String> ips = new ArrayList<String>(iPAddressesFandR.values());
       for (String ipAddress : ips) {
         assertNotNull(ipAddress);
         System.out.println(ipAddress);
       }
     }
     db.close();
   } catch (Exception ex) {
     System.err.println(ex.getMessage());
   }
 }