@Test
public void testDescriptionFormatting() throws Exception {
final IsPojo<SomeClass> sut = pojo(SomeClass.class)
.where("baz", is(pojo(SomeClass.class).where("foo", is(42))))
.where("foo", is(42))
.withProperty("bar", is("bar"));
final StringDescription description = new StringDescription();
sut.describeTo(description);
assertThat(description.toString(), is(
"SomeClass {\n"
+ " baz(): is SomeClass {\n"
+ " foo(): is <42>\n"
+ " }\n"
+ " foo(): is <42>\n"
+ " getBar(): is \"bar\"\n"
+ "}"
));
}
IsPojoTest.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:java-hamcrest
作者:
评论列表
文章目录