Package org.araneaframework.mock.widget

Examples of org.araneaframework.mock.widget.MockViewPortWidget


 
  public void testSerialization() throws Exception {
    adapter = (ServletServiceAdapterComponent)initAdapter("serializationTestsConf.xml");
   
    BeanFactory factory = servlet.getFactory();
    MockViewPortWidget widget = (MockViewPortWidget)factory.getBean("rootWidget");
    widget.setChild(new MockStandardWidget());
    adapter.service(req, resp);
    //success if no exception thrown
  }
View Full Code Here


   
    adapter = (ServletServiceAdapterComponent)initAdapter("repeatedRequest.xml");
    // lets get reference to the bean doing the heavy-lifting
    // its a singleton, so we're cool
    BeanFactory factory = servlet.getFactory();
    MockViewPortWidget widget = (MockViewPortWidget)factory.getBean("rootWidget");
   
    req.addParameter(StandardWidget.EVENT_HANDLER_ID_KEY, event);
    req.addParameter(StandardWidgetContainerWidget.EVENT_PATH_KEY, widgetKey);
   
    // 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);
View Full Code Here

  }
 
  public void testDestroyPropagates() throws Exception {
    adapter = (ServletServiceAdapterComponent)initAdapter("repeatedRequest.xml");
   
    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.widget.MockViewPortWidget

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.