org.easymock.EasyMock.resetToDefault()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.easymock.EasyMock.resetToDefault()方法的一些代码示例,展示了EasyMock.resetToDefault()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EasyMock.resetToDefault()方法的具体详情如下:
包路径:org.easymock.EasyMock
类名称:EasyMock
方法名:resetToDefault

EasyMock.resetToDefault介绍

[英]Resets the given mock objects (more exactly: the controls of the mock objects) and turn them to a mock with default behavior. For details, see the EasyMock documentation.
[中]重置给定的模拟对象(更确切地说:模拟对象的控件),并将其转换为具有默认行为的模拟。有关详细信息,请参阅EasyMock文档。

代码示例

代码示例来源:origin: de.akquinet.jbosscc/jbosscc-needle

/**
 * Resets the given mock objects and turns them to a mock with default
 * behavior. For details, see the EasyMock documentation.
 *
 * @param mocks
 *            the mock objects
 */
public void resetToDefault(final Object... mocks) {
  EasyMock.resetToDefault(mocks);
}

代码示例来源:origin: de.akquinet.jbosscc/jbosscc-needle

/**
 * Resets the given mock object and turns them to a mock with default
 * behavior. For details, see the EasyMock documentation.
 *
 * @param mock
 *            the mock object
 *
 * @return the mock object
 */
@SuppressWarnings("unchecked")
public <X> X resetToDefault(final Object mock) {
  EasyMock.resetToDefault(mock);
  return (X) mock;
}

代码示例来源:origin: bedatadriven/activityinfo

private void expectBounds(Extents bounds, String name) {
  resetToDefault(boundsListener);
  boundsListener.handleEvent(eq(new BoundsChangedEvent(bounds, name)));
  replay(boundsListener);
}

代码示例来源:origin: bedatadriven/activityinfo

private void expectEnabledEvents(AdminLevelDTO... levels) {
  resetToDefault(levelStateChangeListener);
  for (AdminLevelDTO level : levels) {
    levelStateChangeListener.handleEvent(eq(new LevelStateChangeEvent(
        level.getId(), true)));
  }
  replay(levelStateChangeListener);
}

代码示例来源:origin: bedatadriven/activityinfo

private void expectSelections(Collection<AdminEntityDTO> values) {
  resetToDefault(selectionListener);
  for (AdminEntityDTO entity : values) {
    selectionListener.handleEvent(eq(new AdminLevelSelectionEvent(
        entity.getLevelId(), entity)));
  }
  replay(selectionListener);
}

相关文章