@Override public void prepareTestInstance(TestContext testContext) throws Exception { final JUnitConfigurationEnvironment anno = findAnnotation(testContext); if (anno != null) { DaoTestConfigBean bean = new DaoTestConfigBean(); bean.afterPropertiesSet(); // Set any additional system properties that are specified in the unit test annotation for (String prop : anno.systemProperties()) { int equals = prop.indexOf("="); if (equals > 0) { String key = prop.substring(0, equals); String value = prop.substring(equals + 1); System.setProperty(key, value); } else { throw new IllegalArgumentException("Invalid system property value: " + prop); } } } } }
@Before public void setUpConfigDao() throws Exception { DaoTestConfigBean daoTestConfig = new DaoTestConfigBean(); daoTestConfig.setRelativeHomeDirectory("src/test/resources"); daoTestConfig.afterPropertiesSet(); m_daoConfigResource = ConfigurationTestUtils.getSpringResourceForResource(this, "/microblog-configuration.xml"); Assert.assertTrue(m_daoConfigResource.exists()); }
DaoTestConfigBean bean = new DaoTestConfigBean(); bean.afterPropertiesSet();
protected void setUp() throws Exception { MockUtil.println("################# Running Test ################"); DaoTestConfigBean bean = new DaoTestConfigBean(); bean.afterPropertiesSet();
@Before public void setUp() throws Exception { DaoTestConfigBean bean = new DaoTestConfigBean(); bean.afterPropertiesSet();