mirror of https://github.com/apache/jclouds.git
added negative tests so that we know what to update when guava 10.0 final is out
This commit is contained in:
parent
b0e2dccd43
commit
78d2564ba3
|
@ -59,6 +59,20 @@ public class CacheLearningTest {
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
assertEquals(e.getMessage(), "testLoader returned null for key foo.");
|
assertEquals(e.getMessage(), "testLoader returned null for key foo.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
assertEquals(cache.activeEntries(Integer.MAX_VALUE).size(), 1);
|
||||||
|
assert false : "I suppose this works now! Go hunt asMap().keySet()!";
|
||||||
|
} catch (UnsupportedOperationException e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
cache.asMap().put("foo", "bar");
|
||||||
|
assertEquals(cache.get("foo"), "bar");
|
||||||
|
assert false : "I suppose this works now! Go hunt for invalidate calls!";
|
||||||
|
} catch (UnsupportedOperationException e) {
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
cache.get("exception");
|
cache.get("exception");
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
|
|
Loading…
Reference in New Issue