Exemple #1
0
 private static void assertEqualList(List<?> a, Collection<?> b) {
   if (a.size() == b.size()) {
     for (Object x : a) {
       if (!b.contains(x))
         throw new AssertionFailedError("expected:<" + a + "> but was: <" + b + ">");
     }
     return;
   }
   throw new AssertionFailedError("expected:<" + a + "> but was: <" + b + ">");
 }
  private void createProfilesXPath(String... alsoLoadProfiles) throws XPathExpressionException {
    fragmentRefExpressions.add(xPath.compile("fragment"));
    resourcesRefExpressions.add(xPath.compile("resources"));

    for (String profile : activeProfiles) {
      fragmentRefExpressions.add(xPath.compile("profile[@name='" + profile + "']/fragment"));
      resourcesRefExpressions.add(xPath.compile("profile[@name='" + profile + "']/resources"));
    }

    for (String profile : alsoLoadProfiles) {
      fragmentRefExpressions.add(xPath.compile("profile[@name='" + profile + "']/fragment"));
      resourcesRefExpressions.add(xPath.compile("profile[@name='" + profile + "']/resources"));
    }
  }
 public void addResourceReaders(Collection<ResourceReader> readers) {
   resourcesReaders.addAll(readers);
 }
 public void addResourceReader(ResourceReader reader) {
   resourcesReaders.add(reader);
 }