junit.contrib

来源:互联网 发布:淘宝客是什么意思 编辑:程序博客网 时间:2024/05/23 19:44

junit.contrib的包在

<dependency><groupId>com.github.stefanbirkner</groupId><artifactId>system-rules</artifactId><version>1.16.1</version><scope>test</scope></dependency>

使用

@Rulepublic final SystemOutRule log = new SystemOutRule();@Rulepublic final StandardOutputStreamLog l = new StandardOutputStreamLog();//已废弃        l.getLog();        log.getLog();