// Excluded resource list in a file
File order = new File("resources.exc");
order.createNewFile();
Files.write(order.toPath(), "**.jcov".getBytes());
check("@" + order.getAbsolutePath(), "/num/toto.jcov", true);
}
publicvoid check(String s, String sample, boolean exclude) throws Exception {
Map<String, String> prop = new HashMap<>();
ExcludePlugin excludePlugin = new ExcludePlugin();
prop.put(excludePlugin.getName(), s);
excludePlugin.configure(prop);
ResourcePoolManager resourcesMgr = new ResourcePoolManager();
ResourcePoolEntry resource = ResourcePoolEntry.create(sample, newbyte[0]);
resourcesMgr.add(resource);
ResourcePoolManager resultMgr = new ResourcePoolManager();
ResourcePool resPool = excludePlugin.transform(resourcesMgr.resourcePool(),
resultMgr.resourcePoolBuilder()); if (exclude) { if (resPool.contains(resource)) { thrownew AssertionError(sample + " should be excluded by " + s);
}
} else { if (!resPool.contains(resource)) { thrownew AssertionError(sample + " shouldn't be excluded by " + s);
}
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.