package com.blueland.ebpm.engine;


import static junit.framework.Assert.assertNotNull;

import javax.sql.DataSource;

import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringRunner;


/**
 * 
 * 本基类主要为子类指定好要装载的spring配置文件
 *
 * @author lw
 * 请设置好要装载的spring配置文件,一般开发数据库与测试数据库分开
 * 所以你要装载的资源文件应改为"classpath:/spring/*-test-resource.xml"
 */
@RunWith(SpringRunner.class)
public class BaseManagerTestCase extends AbstractTransactionalJUnit4SpringContextTests{

	protected DataSource getDataSource() {
		DataSource ds = (DataSource)applicationContext.getBean("dataSource");
		assertNotNull("not found 'dataSource'",ds);
		return ds;
	}
	
    
}
