예제 #1
0
  public String[] getAvailableAssertionNames(Assertable assertable) {
    List<String> result = new ArrayList<String>();

    for (TestAssertionFactory assertion : availableAssertions.values()) {
      if (assertion.canAssert(assertable)) {
        result.add(assertion.getAssertionLabel());
      }
    }

    return result.toArray(new String[result.size()]);
  }
예제 #2
0
 public void removeFactory(TestAssertionFactory factory) {
   availableAssertions.remove(factory.getAssertionId());
   assertionLabels.remove(factory.getAssertionLabel());
 }
예제 #3
0
 public void addAssertion(TestAssertionFactory factory) {
   availableAssertions.put(factory.getAssertionId(), factory);
   assertionLabels.put(factory.getAssertionLabel(), factory.getAssertionId());
 }