org.test4j.hamcrest.iassert.common.intf
接口 IListHasItemsAssert<E extends IAssert>

类型参数:
E -
所有已知子接口:
IArrayAssert, ICollectionAssert
所有已知实现类:
AllAssert, ArrayAssert, BooleanAssert, ByteAssert, CharacterAssert, CollectionAssert, ComparableAssert, DateAssert, DoubleAssert, FloatAssert, IntegerAssert, JSONAssert, ListAssert, ListHasItemsAssert, LongAssert, MapAssert, NumberAssert, ObjectAssert, ReflectionAssert, ShortAssert, SizeAssert, StringAssert

public interface IListHasItemsAssert<E extends IAssert>

数组或collection类型的对象容器断言

作者:
darui.wudr

方法摘要
 E allItemsMatchAll(Matcher matcher, Matcher... matchers)
          all of items in collection(array) should match all of matchers specified by following arguments.
 E allItemsMatchAny(Matcher matcher, Matcher... matchers)
          all of items in collection(array) should match any of matchers specified by following arguments.
 E anyItemsMatchAll(Matcher matcher, Matcher... matchers)
          any of items in collection(array) should match all of matchers specified by following arguments.
 E anyItemsMatchAny(Matcher matcher, Matcher... matchers)
          any of items in collection(array) should match any of matchers specified by following arguments.
 E hasAllItems(Object value, Object... values)
          want: the collection or the array should contain all items listed by following arguments.
 E hasAnyItems(Object value, Object... values)
          want: the collection or the array should contain any items listed by following arguments.
 E hasItems(Object value)
          want: the collection or the array should contain item specified by argument.
 E hasItems(Object item, Object... items)
          want: the collection or the array should contain item specified by argument.
 E match(ItemsMode itemsMode, MatchMode matchMode, Matcher matcher, Matcher... matchers)
          all of any(specified by ItemsMode) items(properties) should match all or any(specified by MatchMode) matchers.
 

方法详细信息

hasAllItems

E hasAllItems(Object value,
              Object... values)
want: the collection or the array should contain all items listed by following arguments.

参数:
value - expected item
values - other expected items
返回:

hasItems

E hasItems(Object value)
want: the collection or the array should contain item specified by argument.

参数:
value -
返回:

hasItems

E hasItems(Object item,
           Object... items)
want: the collection or the array should contain item specified by argument.

参数:
item -
items -
返回:

hasAnyItems

E hasAnyItems(Object value,
              Object... values)
want: the collection or the array should contain any items listed by following arguments.

参数:
value - expected item
values - other expected items
返回:

allItemsMatchAll

E allItemsMatchAll(Matcher matcher,
                   Matcher... matchers)
all of items in collection(array) should match all of matchers specified by following arguments.
same as #match(ItemsMode.AllItems, MatchMode.MatchAll, Matcher, Matcher...)

参数:
matcher -
matchers -
返回:

allItemsMatchAny

E allItemsMatchAny(Matcher matcher,
                   Matcher... matchers)
all of items in collection(array) should match any of matchers specified by following arguments.
same as #match(ItemsMode.AllItems, MatchMode.MatchAny, Matcher, Matcher...)

参数:
matcher -
matchers -
返回:

anyItemsMatchAll

E anyItemsMatchAll(Matcher matcher,
                   Matcher... matchers)
any of items in collection(array) should match all of matchers specified by following arguments.
same as #match(ItemsMode.AnyItems, MatchMode.MatchAll, Matcher, Matcher...)

参数:
matcher -
matchers -
返回:

anyItemsMatchAny

E anyItemsMatchAny(Matcher matcher,
                   Matcher... matchers)
any of items in collection(array) should match any of matchers specified by following arguments.
same as #match(ItemsMode.AnyItems, MatchMode.MatchAny, Matcher, Matcher...)

参数:
matcher -
matchers -
返回:

match

E match(ItemsMode itemsMode,
        MatchMode matchMode,
        Matcher matcher,
        Matcher... matchers)
all of any(specified by ItemsMode) items(properties) should match all or any(specified by MatchMode) matchers.
when itemsMode==AllItems && matchMode==MatchAll, same as allItemsMatchAll(Matcher, Matcher...)
when itemsMode==AllItems && matchMode==MatchAny, same as allItemsMatchAny(Matcher, Matcher...)
when itemsMode==AnyItems && matchMode==MatchAll, same as anyItemsMatchAll(Matcher, Matcher...)
when itemsMode==AnyItems && matchMode==MatchAny, same as anyItemsMatchAny(Matcher, Matcher...)

数组中所有或任一(由ItemsMode决定)元素必须和下列全部或任一(由MatchMode决定)Matcher匹配。

参数:
itemsMode -
matchMode -
matcher -
matchers -
返回:


Copyright © 2013. All rights reserved.