Created
July 9, 2012 02:52
-
-
Save sforteln/3073934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.spring; | |
import org.junit.Test; | |
import static org.junit.Assert.*; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
import javax.sql.DataSource; | |
public class ApplicationContext { | |
static final String[] CONTEXT_FILES = new String[] {"datasource.xml","beans.xml"}; | |
@Test | |
public void createAppContext() { | |
ApplicationContext context = new ClassPathXmlApplicationContext(CONTEXT_FILES); | |
DataSource ds = (DataSource)context.getBean("datasource"); | |
assertNotNull(ds); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment