Package org.araneaframework.mock.core

Examples of org.araneaframework.mock.core.MockEventfulStandardWidget


    this.widget = widget;
  }
 
  public void init() throws Exception {
    if(widget == null)
      setChild(new MockEventfulStandardWidget());
   
    super.init();
  }
View Full Code Here


public class StandardWidgetAdapterServiceTests extends TestCase {
  private StandardWidgetAdapterService adapter;
  private MockEventfulStandardWidget widget;
 
  public void setUp() throws Exception {
    widget = new MockEventfulStandardWidget();
   
    adapter = new StandardWidgetAdapterService();
    adapter.setChildWidget(widget);
    MockLifeCycle.begin(adapter);
  }
View Full Code Here

    adapter = new StandardWidgetAdapterService() {
      public boolean propagateAsAction(InputData input) {
        return true;
      }
    };
    widget = new MockEventfulStandardWidget();
    adapter.setChildWidget(widget);
    MockLifeCycle.begin(adapter);
   
    adapter._getService().action(MockUtil.getPath(), MockUtil.getInput(), MockUtil.getOutput());
   
View Full Code Here

  private MockHttpServletResponse res;
 
  private Path path;
 
  public void setUp() throws Exception {
    child = new MockEventfulStandardWidget();
    parent = new StandardWidgetContainerWidget();
    parent.setChildWidget(child);
    MockLifeCycle.begin(parent);
   
    req = new MockHttpServletRequest();
View Full Code Here

   
    // first request, transactionId will get intialized
    adapter.service(req, resp);
    // helper returns true on null transactionId
   
    MockEventfulStandardWidget child1 =
      (MockEventfulStandardWidget)widget.getChildren().get(widgetKey);
    req.addParameter(StandardTransactionFilterWidget.TRANSACTION_ID_KEY, ""+child1.getTransactionId());
   
    // second request with the valid transactionId
    adapter.service(req, resp);

    assertTrue(child1.getEventProcessed());
    child1.setEventProcessed(false);
   
    req.addParameter(StandardTransactionFilterWidget.TRANSACTION_ID_KEY, ""+child1.getTransactionId());   
    adapter.service(req, resp);
    // transactionId used 2nd time, should not process the event
    assertFalse(child1.getEventProcessed());
  }
View Full Code Here

    MockViewPortWidget widget = (MockViewPortWidget)servlet.getFactory().getBean("rootWidget");
    // initializes everything
    adapter.service(req, resp);
    adapter._getComponent().destroy();
   
    MockEventfulStandardWidget child = (MockEventfulStandardWidget)widget.getChildren().get(StandardViewPortWidget.CHILD_KEY);
    assertTrue(child.getDestroyCalled());
  }
View Full Code Here

TOP

Related Classes of org.araneaframework.mock.core.MockEventfulStandardWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.