Пример #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 + ">");
 }
Пример #2
0
  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"));
    }
  }
Пример #3
0
 public void addResourceReaders(Collection<ResourceReader> readers) {
   resourcesReaders.addAll(readers);
 }
Пример #4
0
 public void addResourceReader(ResourceReader reader) {
   resourcesReaders.add(reader);
 }