change expect exception in ut
This commit is contained in:
parent
77240dc024
commit
e84957c768
@ -1,15 +1,16 @@
|
|||||||
package com.baeldung.factorybean;
|
package com.baeldung.factorybean;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.springframework.beans.factory.BeanCreationException;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
public class FactoryBeanInitializeTest {
|
public class FactoryBeanInitializeTest {
|
||||||
@Test(expected = Exception.class)
|
@Test(expected = BeanCreationException.class)
|
||||||
public void testInitializationToolFactory() {
|
public void testInitializationToolFactory() {
|
||||||
new ClassPathXmlApplicationContext("classpath:factorybean-init-spring-ctx.xml");
|
new ClassPathXmlApplicationContext("classpath:factorybean-init-spring-ctx.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = Exception.class)
|
@Test(expected = BeanCreationException.class)
|
||||||
public void testPostConstructToolFactory() {
|
public void testPostConstructToolFactory() {
|
||||||
new ClassPathXmlApplicationContext("classpath:factorybean-postconstruct-spring-ctx.xml");
|
new ClassPathXmlApplicationContext("classpath:factorybean-postconstruct-spring-ctx.xml");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user