net.webapp2.util.test
Class TestBase

java.lang.Object
  extended by net.webapp2.util.test.TestBase
Direct Known Subclasses:
EnumTypeHandlerTest, ManagedObjectDaoSupportTest, SimpleSqlExecutorTest

public abstract class TestBase
extends Object

Spring 컨텍스트 파일 설정으로 IoC를 활용한 테스트를 수행

Author:
younghoe

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
TestBase()
           
TestBase(String contextPropertiesFilePath)
          context.properties 파일의 위치를 변경하고자 할 경우
 
Method Summary
 Object getBean(String beanName)
          테스트용 Bean Factory가 관리하는 객체(bean) 반환
 BeanFactory getBeanFactory()
          테스트 과정에서 쓰이는 BeanFactory 반환
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

TestBase

public TestBase(String contextPropertiesFilePath)
         throws FileNotFoundException,
                IOException,
                PropertyDefinitionNotFoundException
context.properties 파일의 위치를 변경하고자 할 경우

Parameters:
contextPropertiesFilePath - 변경할 context.properties 파일의 위치
Throws:
PropertyDefinitionNotFoundException
IOException
FileNotFoundException

TestBase

public TestBase()
         throws FileNotFoundException,
                IOException,
                PropertyDefinitionNotFoundException
Throws:
FileNotFoundException
IOException
PropertyDefinitionNotFoundException
Method Detail

getBeanFactory

public BeanFactory getBeanFactory()
테스트 과정에서 쓰이는 BeanFactory 반환

Returns:
테스트 과정에서 쓰이는 BeanFactory 객체

getBean

public Object getBean(String beanName)
테스트용 Bean Factory가 관리하는 객체(bean) 반환

Parameters:
beanName - 객체 이름
Returns: