MoxieMatchers.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:moxiemocks 作者:
/**
 *
 * Matches an array of <code>byte</code> containing elements matching the given parameters (which may be {@link MoxieMatchers} invocations).
 * <p>
 *
 * Note that the order in which the values to be matched are specified is not significant; the array merely needs to
 * contain a match for each given parameter in any order.  For a matcher where ordering is significant, use {@link MoxieMatchers#array(byte...) array()}.
 * <p>
 *
 * @return <code>null</code>
 */
@SuppressWarnings("unchecked")
static public byte[] byteArrayWithAll(byte... items) {
    List<Matcher> itemMatchers = MatcherSyntax.matcherListFragment(byte.class, items);
    List<Matcher> arrayMatchers = new ArrayList<Matcher>();
    for (Matcher itemMatcher : itemMatchers) {
        arrayMatchers.add(IsArrayContaining.hasItemInArray(itemMatcher));
    }
    return argThat(byte[].class, new AllOf(arrayMatchers));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号