摘要:
pom.xml配置 4.0.0 TestPractice TestPractice 1.0 junit junit 4.11 test ... 阅读全文
摘要:
assertThat方法需要使用hamcrest的匹配方法:示例assertThat( n, allOf( greaterThan(1), lessThan(15) ) );assertThat( n, anyOf( greaterThan(16), lessThan(8) ) );assertThat( n, anything() );assertThat( str, is( "bjsxt" ) );assertThat( str, not( "bjxxt" ) );assertThat( str, containsString( "bjsx 阅读全文
摘要:
4.0.0 xxx.common xxx-supom-generic 1.2.32 com.xxx.fresh maventest 1.0.0 war junit junit 4.1.0 ... 阅读全文
摘要:
这写API可解决的问题1. 集合元素的过滤 - FluentIterable Predicate Range Function1) 先说Predicate,这个相当与一个过滤原则,里面有个apply()方法,通过一定的条件返回true或false,依次判断元素需不需要过滤其中T表示待过滤集合里面的元素类型,举个例子package guavaexam.test;public class Man { private String name; private int age; public Man(String name, int age) { this.name =... 阅读全文