change expect exception in ut

This commit is contained in:
DianeDuan 2016-11-21 21:51:20 +08:00
parent 77240dc024
commit e84957c768
1 changed files with 3 additions and 2 deletions

View File

@ -1,15 +1,16 @@
package com.baeldung.factorybean;
import org.junit.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class FactoryBeanInitializeTest {
@Test(expected = Exception.class)
@Test(expected = BeanCreationException.class)
public void testInitializationToolFactory() {
new ClassPathXmlApplicationContext("classpath:factorybean-init-spring-ctx.xml");
}
@Test(expected = Exception.class)
@Test(expected = BeanCreationException.class)
public void testPostConstructToolFactory() {
new ClassPathXmlApplicationContext("classpath:factorybean-postconstruct-spring-ctx.xml");
}