Changeset 327 for trunk/tests
- Timestamp:
- 09/25/08 11:58:55 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/org/expeditee/gui/DisplayIOTest.java
r310 r327 3 3 import java.awt.event.InputEvent; 4 4 import java.util.Collection; 5 import java.util.HashMap;6 import java.util.Map;7 5 8 6 import junit.framework.TestCase; … … 43 41 Collection<Item> items = testFrame.getVisibleItems(); 44 42 assertTrue(items.size() == 12); 45 Map<String, Integer> itemCounts = getItemCount(items);43 //Map<String, Integer> itemCounts = getItemCount(items); 46 44 47 45 } … … 62 60 } 63 61 64 private Map<String, Integer> getItemCount(Collection<Item> items) {65 Map<String, Integer> itemCounts = new HashMap<String,Integer>();66 for(Item i : items){67 String className = i.getClass().toString();68 if(itemCounts.containsKey(className)){69 itemCounts.put(className, itemCounts.get(className)+1);70 }else{71 itemCounts.put(className, 1);72 }73 74 }75 return itemCounts;76 }62 // private Map<String, Integer> getItemCount(Collection<Item> items) { 63 // Map<String, Integer> itemCounts = new HashMap<String,Integer>(); 64 // for(Item i : items){ 65 // String className = i.getClass().toString(); 66 // if(itemCounts.containsKey(className)){ 67 // itemCounts.put(className, itemCounts.get(className)+1); 68 // }else{ 69 // itemCounts.put(className, 1); 70 // } 71 // 72 // } 73 // return itemCounts; 74 // } 77 75 78 76 // public final void testReleaseMouse() {
Note:
See TracChangeset
for help on using the changeset viewer.