类 org.test4j.hamcrest.matcher.property.reflection.EqMode
的使用

使用 EqMode 的软件包
org.test4j.hamcrest.iassert.common.impl   
org.test4j.hamcrest.iassert.common.intf   
org.test4j.hamcrest.matcher.property   
org.test4j.hamcrest.matcher.property.reflection   
 

org.test4j.hamcrest.iassert.common.implEqMode 的使用
 

参数类型为 EqModeorg.test4j.hamcrest.iassert.common.impl 中的方法
 E ReflectionAssert.eqByReflect(Object expected, EqMode... modes)
           
 E ListAssert.isEqualTo(Object expected, EqMode... modes)
           
 E ReflectionAssert.propertyEq(String[] properties, Object expected, EqMode... modes)
           
 E ReflectionAssert.propertyEq(String property, Object expected, EqMode... modes)
           
 E ReflectionAssert.propertyEqMap(ICore.DataMap expected, EqMode... modes)
           
 E ListAssert.propertyEqMap(int count, ICore.DataMap expected, EqMode... modes)
           
 E ReflectionAssert.reflectionEq(Object expected, EqMode... modes)
           
 E ReflectionAssert.reflectionEqMap(ICore.DataMap expected, EqMode... modes)
           
 E ListAssert.reflectionEqMap(int count, ICore.DataMap expected, EqMode... modes)
           
 E ListAssert.reflectionEqMap(List<ICore.DataMap> expected, EqMode... modes)
           
 

org.test4j.hamcrest.iassert.common.intfEqMode 的使用
 

参数类型为 EqModeorg.test4j.hamcrest.iassert.common.intf 中的方法
 E IReflectionAssert.eqByReflect(Object expected, EqMode... modes)
          通过反射比较实际值和期望值的属性时,二者的属性是相同的
属性如果是复杂对象,递归反射比较
 E IListAssert.isEqualTo(Object expected, EqMode... modes)
          want: the actual value should be equals to the expected value specified by argument.
 E IReflectionAssert.propertyEq(String[] properties, Object expected, EqMode... modes)
          断言对象的多个属性相等
same as "eqByProperties(String[],Object)"
 E IReflectionAssert.propertyEq(String property, Object expected, EqMode... modes)
          断言对象指定的属性(property)值等于期望值
same as "eqByProperty(String, Object)"
 E IReflectionAssert.propertyEqMap(ICore.DataMap expected, EqMode... modes)
          把实际对象按照Map中的key值取出来,进行反射比较
如果对象的属性不在Map中,则不进行比较
功能和 "propertyEq(String[] properties, Object expected, EqMode... modes)"类似, 无非这里是把属性写到了Map中,方便一一对应
 E IListAssert.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 IReflectionAssert.reflectionEq(Object expected, EqMode... modes)
          Same as eqByReflect, will be @Deprecated in the future.
 E IReflectionAssert.reflectionEqMap(ICore.DataMap expected, EqMode... modes)
          Same as propertyEqMap, will be @deprecated in the future.
 E IListAssert.reflectionEqMap(int count, ICore.DataMap expected, EqMode... modes)
          will be @deprecated in the future.
 E IListAssert.reflectionEqMap(List<ICore.DataMap> expected, EqMode... modes)
           
 

org.test4j.hamcrest.matcher.propertyEqMode 的使用
 

参数类型为 EqModeorg.test4j.hamcrest.matcher.property 中的构造方法
MapListPropertyEqaulMatcher(List<ICore.DataMap> expected, EqMode[] modes)
           
MapPropertyEqaulMatcher(ICore.DataMap expected, EqMode[] modes)
           
PropertiesArrayRefEqMatcher(String[] properties, Object[][] expected, EqMode... modes)
           
PropertiesEqualMatcher(Object expected, String[] properties, EqMode[] modes)
           
PropertyEqualMatcher(Object expected, String properties, EqMode[] modes)
           
ReflectionEqualMatcher(Collection expected, EqMode[] modes)
           
ReflectionEqualMatcher(List expected, EqMode[] modes)
           
ReflectionEqualMatcher(Object expected, EqMode[] modes)
           
ReflectionEqualMatcher(T[] expected, EqMode[] modes)
           
 

org.test4j.hamcrest.matcher.property.reflectionEqMode 的使用
 

返回 EqModeorg.test4j.hamcrest.matcher.property.reflection 中的方法
static EqMode EqMode.valueOf(String name)
          返回带有指定名称的该类型的枚举常量。
static EqMode[] EqMode.values()
          按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。
 

参数类型为 EqModeorg.test4j.hamcrest.matcher.property.reflection 中的方法
static ReflectionComparator ReflectionComparatorFactory.createRefectionComparator(EqMode... modes)
          Creates a reflection comparator for the given modes.
 

类型变量类型为 EqModeorg.test4j.hamcrest.matcher.property.reflection 中的方法参数
protected static List<Comparator> ReflectionComparatorFactory.getComparatorChain(List<EqMode> modes)
          Creates a comparator chain for the given modes.
 



Copyright © 2013. All rights reserved.