本文整理汇总了Java中org.unitils.reflectionassert.report.impl.DefaultDifferenceReport类的典型用法代码示例。如果您正苦于以下问题:Java DefaultDifferenceReport类的具体用法?Java DefaultDifferenceReport怎么用?Java DefaultDifferenceReport使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultDifferenceReport类属于org.unitils.reflectionassert.report.impl包,在下文中一共展示了DefaultDifferenceReport类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFailureMessage
import org.unitils.reflectionassert.report.impl.DefaultDifferenceReport; //导入依赖的package包/类
/**
* @param message a custom user-provided message, null if the user didn't provide a message
* @param difference the difference, not null
* @return a failure message describing the difference found
*/
protected static String getFailureMessage(String message, Difference difference) {
StringBuilder failureMessage = new StringBuilder();
failureMessage.append(message == null ? "" : message + "\n");
failureMessage.append(new DefaultDifferenceReport().createReport(difference));
return failureMessage.toString();
}
示例2: describeTo
import org.unitils.reflectionassert.report.impl.DefaultDifferenceReport; //导入依赖的package包/类
@Override
public void describeTo(Description description) {
if(difference != null) {
description.appendText(new DefaultDifferenceReport().createReport(difference));
}
}