コード例 #1
0
 private int doCategoryTest(String path, Category category, int n) throws Exception {
   Resource resource = getLibrary().getResource(path);
   Resource[] chain = resource.getClasspathProviders(category);
   int j = chain.length;
   if (n > -1) {
     assertEquals("chain-length in " + path, n, j);
   } else {
     System.out.println("# " + path + ", " + category.getName().toUpperCase());
     for (int i = 0; i < chain.length; i++) {
       System.out.println("# (" + (i + 1) + ") " + chain[i]);
     }
   }
   return chain.length;
 }
コード例 #2
0
 /**
  * Testing test classpath providers.
  *
  * @exception Exception if a test error occurs
  */
 public void testTestClasspathProviders() throws Exception {
   String path = "dpml/transit/dpml-transit-tools";
   Resource resource = getLibrary().getResource(path);
   Resource[] chain = resource.getClasspathProviders(Scope.TEST);
   assertEquals("chain-length", 5, chain.length);
 }