コード例 #1
0
  protected IFormComponent newField(String displayName) {
    IFormComponent field = newMock(IFormComponent.class);

    expect(field.getDisplayName()).andReturn(displayName);

    return field;
  }
コード例 #2
0
  protected IFormComponent newField(String displayName, String clientId) {
    IFormComponent field = newMock(IFormComponent.class);
    checkOrder(field, false);

    expect(field.getClientId()).andReturn(clientId).anyTimes();
    expect(field.getDisplayName()).andReturn(displayName);

    return field;
  }