Exemplo n.º 1
0
 public <T> void singleOccurence(Collection<T> collection, T item) {
   int number = countOccurences(collection, item);
   if (number != 1) {
     enumerate(collection);
     Assert.fail(myStringConvertion.convert(item) + "\n occured " + number + " times");
   }
 }
Exemplo n.º 2
0
 public void containsAll(Collection list, Collection subCollection) {
   if (list.containsAll(subCollection)) return;
   for (Object item : subCollection) {
     boolean isContained = false;
     for (Object superSetItem : list) {
       if (myEquality.equals(superSetItem, item)) {
         isContained = true;
         break;
       }
     }
     Assert.assertTrue(myStringConvertion.convert(item), isContained);
   }
 }
Exemplo n.º 3
0
 private String convertToString(Object object) {
   if (object == null) return "null";
   return myStringConvertion.convert(object);
 }