INT-1257, added convinience method MessageHistory.containsEntryWithName(string), added tests in XML to validate MessageHistory

This commit is contained in:
Oleg Zhurakousky
2010-09-21 13:49:46 -04:00
parent 19c705fcbc
commit f8b501e4f9
3 changed files with 20 additions and 4 deletions

View File

@@ -87,6 +87,15 @@ public class MessageHistory implements List<Properties> {
public boolean contains(Object o) {
return this.components.contains(o);
}
public boolean containsEntryWithName(String name) {
for (Properties properties : components) {
if (properties.getProperty("name").equals(name)){
return true;
}
}
return false;
}
public boolean containsAll(Collection<?> c) {
return this.components.containsAll(c);