Browse Source

SPR-8238

+ add NPE test
pull/7/head
Costin Leau 14 years ago
parent
commit
5206f5bc9a
  1. 15
      org.springframework.context/src/test/java/org/springframework/cache/config/AbstractAnnotationTest.java

15
org.springframework.context/src/test/java/org/springframework/cache/config/AbstractAnnotationTest.java vendored

@ -148,6 +148,11 @@ public abstract class AbstractAnnotationTest { @@ -148,6 +148,11 @@ public abstract class AbstractAnnotationTest {
assertTrue(cache.containsKey(expectedKey));
}
public void testNullArg(CacheableService service) {
Object r1 = service.cache(null);
assertSame(r1, service.cache(null));
}
@Test
public void testCacheable() throws Exception {
testCacheable(cs);
@ -226,4 +231,14 @@ public abstract class AbstractAnnotationTest { @@ -226,4 +231,14 @@ public abstract class AbstractAnnotationTest {
public void testClassRootVars() throws Exception {
testRootVars(ccs);
}
@Test
public void testNullArg() throws Exception {
testNullArg(cs);
}
@Test
public void testClassNullArg() throws Exception {
testNullArg(ccs);
}
}
Loading…
Cancel
Save