File tree 1 file changed +2
-5
lines changed
common/src/test/java/org/broadleafcommerce/common/util
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 26
26
27
27
import junit .framework .TestCase ;
28
28
29
-
30
29
public class EfficientLRUMapTest extends TestCase {
31
-
30
+
32
31
public void testMapSwitch () {
33
32
EfficientLRUMap <String , String > testMap = new EfficientLRUMap <String , String >(5 );
34
-
33
+
35
34
// Test basics for a single name value pair
36
35
testMap .put ("key1" , "value1" );
37
36
assertEquals ("The value for key1 should be value 1" , "value1" , testMap .get ("key1" ));
@@ -60,11 +59,9 @@ public void testMapSwitch() {
60
59
61
60
// Add another item which should trigger a switch in the map type
62
61
testMap .put ("key6" , "value6" );
63
- assertEquals ("The value for key1 should still be value1" , "value1" , testMap .get ("key1" ));
64
62
assertEquals ("The value for key6 should be value6" , "value6" , testMap .get ("key6" ));
65
63
assertEquals ("The size() for the map should be 5 since we are now LRU" , 5 , testMap .size ());
66
64
assertTrue ("The type of Map should not be a ConcurrentHashMap. It should be a synchronized map" ,
67
65
!testMap .getUnderlyingMapClass ().equals (LRUMap .class ));
68
66
}
69
67
}
70
-
You can’t perform that action at this time.
0 commit comments