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()]); }
public void removeFactory(TestAssertionFactory factory) { availableAssertions.remove(factory.getAssertionId()); assertionLabels.remove(factory.getAssertionLabel()); }
public void addAssertion(TestAssertionFactory factory) { availableAssertions.put(factory.getAssertionId(), factory); assertionLabels.put(factory.getAssertionLabel(), factory.getAssertionId()); }