Exemplo n.º 1
0
 /** A clean way to specify which tests run on which platforms. */
 public boolean isPlatformSupported(DatabasePlatform platform) {
   boolean supported = false;
   boolean notSupported = false;
   if ((unsupportedPlatforms == null) && (supportedPlatforms == null)) {
     return true;
   }
   if (supportedPlatforms != null) {
     for (Iterator iterator = supportedPlatforms.iterator(); iterator.hasNext(); ) {
       Class platformClass = (Class) iterator.next();
       if (platformClass.isInstance(platform)) {
         supported = true;
       }
     }
   } else {
     supported = true;
   }
   if (unsupportedPlatforms != null) {
     for (Iterator iterator = unsupportedPlatforms.iterator(); iterator.hasNext(); ) {
       Class platformClass = (Class) iterator.next();
       if (platformClass.isInstance(platform)) {
         notSupported = true;
       }
     }
   }
   return supported && (!notSupported);
 }