My fork of airsonic with experimental fixes and improvements. See branch "custom"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
airsonic-custom/airsonic-main/src/test/java/org/airsonic/player/dao/DaoTestCaseBean2.java

35 lines
1.2 KiB

package org.airsonic.player.dao;
import org.airsonic.player.util.HomeRule;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@SpringBootTest
public class DaoTestCaseBean2 {
@ClassRule
public static final SpringClassRule classRule = new SpringClassRule() {
HomeRule airsonicRule = new HomeRule();
@Override
public Statement apply(Statement base, Description description) {
Statement newBase = airsonicRule.apply(base, description);
return super.apply(newBase, description);
}
};
@Rule
public final SpringMethodRule springMethodRule = new SpringMethodRule();
@Autowired
GenericDaoHelper genericDaoHelper;
JdbcTemplate getJdbcTemplate() {
return genericDaoHelper.getJdbcTemplate();
}
}