Usage and Idioms——Matchers and assertthat

Posted cheung

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Usage and Idioms——Matchers and assertthat相关的知识,希望对你有一定的参考价值。

assertThat

一种插入机制,语法如下:

assertThat([value], [matcher statement]);

例如:

assertThat(x, is(3));

assertThat(x, is(not(4)));

assertThat(responseString, either(containsString("color")).or(containsString("colour")));

assertThat(myList, hasItem("3"));

 

以上是关于Usage and Idioms——Matchers and assertthat的主要内容,如果未能解决你的问题,请参考以下文章

php APC Configuration and Usage Tips and Tricks

Spring Idioms

17 Go Slices: usage and internals

SSH and CUDA usage

sharepoint 2013 开启 Usage and Health Data Collection

Maintenance Plan Usage4:Check Integrity and Shrink database