org.test4j.hamcrest.iassert.common.intf
接口 IListAssert<T,E extends IAssert>

类型参数:
T -
E -
所有超级接口:
IAssert<T,E>, ISizedAssert<E>, Matcher<T>, SelfDescribing
所有已知子接口:
IArrayAssert, ICollectionAssert
所有已知实现类:
AllAssert, ArrayAssert, BooleanAssert, ByteAssert, CharacterAssert, CollectionAssert, ComparableAssert, DateAssert, DoubleAssert, FloatAssert, IntegerAssert, JSONAssert, ListAssert, LongAssert, MapAssert, NumberAssert, ShortAssert, StringAssert

public interface IListAssert<T,E extends IAssert>
extends IAssert<T,E>, ISizedAssert<E>

作者:
darui.wudr

方法摘要
 E eqIgnoreOrder(Object expected)
          want: the actual collection(array) and the expected collection(array) they are equals when ignoring the items's order in both of them.
 E isEqualTo(Object expected, EqMode... modes)
          want: the actual value should be equals to the expected value specified by argument.
 E propertyEqMap(int count, ICore.DataMap expected, EqMode... modes)
          want: the value of properties specified by DataMap's keys of items in collection(array) should be equal to the value of corresponding key in DataMap.
 E propertyMatch(ItemsMode itemsMode, String property, Matcher matcher)
          the property value of all/any(specified by ItemsMode) items in collection(array) should be matched by the matcher.
 E reflectionEqMap(int count, ICore.DataMap expected, EqMode... modes)
          will be @deprecated in the future.
 E reflectionEqMap(List<ICore.DataMap> expected, EqMode... modes)
           
 
从接口 org.test4j.hamcrest.iassert.common.intf.IAssert 继承的方法
wanted, wanted
 
从接口 ext.test4j.hamcrest.Matcher 继承的方法
describeMismatch, matches
 
从接口 ext.test4j.hamcrest.SelfDescribing 继承的方法
describeTo
 
从接口 org.test4j.hamcrest.iassert.common.intf.ISizedAssert 继承的方法
sizeBetween, sizeEq, sizeGe, sizeGt, sizeIs, sizeLe, sizeLt, sizeNe
 

方法详细信息

isEqualTo

E isEqualTo(Object expected,
            EqMode... modes)
want: the actual value should be equals to the expected value specified by argument.

参数:
expected -
modes -
返回:

propertyMatch

E propertyMatch(ItemsMode itemsMode,
                String property,
                Matcher matcher)
the property value of all/any(specified by ItemsMode) items in collection(array) should be matched by the matcher.

参数:
itemsMode - All or Any Items in Collection or Array.
property - the property name of items in collection or array.
matcher - Hamcrest Matcher
返回:

eqIgnoreOrder

E eqIgnoreOrder(Object expected)
want: the actual collection(array) and the expected collection(array) they are equals when ignoring the items's order in both of them.

忽略顺序的情况下二者相等

参数:
expected -
返回:

reflectionEqMap

E reflectionEqMap(List<ICore.DataMap> expected,
                  EqMode... modes)

reflectionEqMap

E reflectionEqMap(int count,
                  ICore.DataMap expected,
                  EqMode... modes)
will be @deprecated in the future.
same as #propertyEqMap(int, DataMap, EqMode...)

参数:
count -
expected -
modes -
返回:

propertyEqMap

E propertyEqMap(int count,
                ICore.DataMap expected,
                EqMode... modes)
want: the value of properties specified by DataMap's keys of items in collection(array) should be equal to the value of corresponding key in DataMap.
If the property of items in collection doesn't be specified by DataMap, that willn't be compared.

把实际对象按照Map中的key值取出来,进行反射比较
如果对象的属性不在Map中,则不进行比较

参数:
count -
expected -
modes -
返回:


Copyright © 2013. All rights reserved.