Updated BeanMethodTests to reflect change from IllegalArgumentException -> IllegalStateException
This commit is contained in:
parent
69a762e86a
commit
68051ec72b
|
|
@ -28,11 +28,6 @@ import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
|
||||||
import org.springframework.beans.factory.parsing.FailFastProblemReporter;
|
import org.springframework.beans.factory.parsing.FailFastProblemReporter;
|
||||||
import org.springframework.beans.factory.parsing.Location;
|
import org.springframework.beans.factory.parsing.Location;
|
||||||
import org.springframework.beans.factory.parsing.ProblemReporter;
|
import org.springframework.beans.factory.parsing.ProblemReporter;
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.BeanMethod;
|
|
||||||
import org.springframework.context.annotation.ConfigurationClass;
|
|
||||||
import org.springframework.context.annotation.ModelClass;
|
|
||||||
import org.springframework.context.annotation.Scope;
|
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
|
|
@ -63,8 +58,8 @@ public class BeanMethodTests {
|
||||||
assertThat(beanMethod.getRequiredAnnotation(Bean.class), sameInstance(beanAnno));
|
assertThat(beanMethod.getRequiredAnnotation(Bean.class), sameInstance(beanAnno));
|
||||||
try {
|
try {
|
||||||
beanMethod.getRequiredAnnotation(Override.class);
|
beanMethod.getRequiredAnnotation(Override.class);
|
||||||
fail("expected IllegalArgumentException ex");
|
fail("expected IllegalStateException ex");
|
||||||
} catch (IllegalArgumentException ex) { /* expected */ }
|
} catch (IllegalStateException ex) { /* expected */ }
|
||||||
|
|
||||||
// must call setDeclaringClass() before calling getLocation()
|
// must call setDeclaringClass() before calling getLocation()
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue