Exemplo n.º 1
0
  protected final Instantiator mockInstantiator(Component component) {
    Instantiator ins = newMock(Instantiator.class);

    expect(ins.newInstance(EasyMock.isA(InternalComponentResources.class))).andReturn(component);

    return ins;
  }
  public InternalComponentResourcesImpl(
      Page page,
      ComponentPageElement element,
      ComponentResources containerResources,
      ComponentPageElementResources elementResources,
      String completeId,
      String nestedId,
      Instantiator componentInstantiator,
      boolean mixin) {
    this.page = page;
    this.element = element;
    this.containerResources = containerResources;
    this.elementResources = elementResources;
    this.completeId = completeId;
    this.nestedId = nestedId;
    this.mixin = mixin;

    componentModel = componentInstantiator.getModel();
    component = componentInstantiator.newInstance(this);
  }
Exemplo n.º 3
0
 protected final void train_getModel(Instantiator ins, ComponentModel model) {
   expect(ins.getModel()).andReturn(model).atLeastOnce();
 }