- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for testPutAndGetInstance (0.21 sec)
-
android/guava-tests/test/com/google/common/collect/MutableClassToInstanceMapTest.java
*/ map.put(Integer.class, new Integer(5)); assertThrows(ClassCastException.class, () -> map.put(Double.class, new Long(42))); // Won't compile: map.put(String.class, "x"); } public void testPutAndGetInstance() { assertNull(map.putInstance(Integer.class, new Integer(5))); Integer oldValue = map.putInstance(Integer.class, new Integer(7)); assertEquals(5, (int) oldValue);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 20:09:59 UTC 2024 - 4.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java
assertEquals(TypeToken.of(String.class), entry.getKey()); assertEquals("test", entry.getValue()); assertThrows(UnsupportedOperationException.class, () -> entry.setValue(1)); } public void testPutAndGetInstance() { assertNull(map.putInstance(Integer.class, Integer.valueOf(5))); Integer oldValue = map.putInstance(Integer.class, Integer.valueOf(7)); assertEquals(5, (int) oldValue);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 17:15:24 UTC 2024 - 7.9K bytes - Viewed (0)