@Override
protected void before() throws Throwable {
//初始化 slf4j
BasicConfigurator.configure();
//读取配置文件
try {
Config.setConfig(
new Gson().fromJson(
new BufferedReader(new InputStreamReader(Config.class.getResourceAsStream("/config.json"))),
Config.class
)
);
} catch (NullPointerException e) {
//抛出异常就可以取消测试
throw new RuntimeException("Please create config file before tests");
}
}
RuleSuite.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:bilibili-api
作者:
评论列表
文章目录