Examples of TestBean


Examples of com.opensymphony.xwork2.TestBean

            return applicationContextSet;
        }
    }

    public void testShouldAutowireObjectsObtainedFromTheObjectFactoryByClass() throws Exception {
        sac.getBeanFactory().registerSingleton("bean", new TestBean());
        TestBean bean = (TestBean) sac.getBean("bean");

        SimpleAction action = (SimpleAction) objectFactory.buildBean(SimpleAction.class, null);

        assertEquals(bean, action.getBean());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.TestBean

    public void testSetAutowireStrategy() throws Exception {
        assertEquals(objectFactory.getAutowireStrategy(), AutowireCapableBeanFactory.AUTOWIRE_BY_NAME);

        objectFactory.setAutowireStrategy(AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE);

        sac.getBeanFactory().registerSingleton("bean", new TestBean());
        TestBean bean = (TestBean) sac.getBean("bean");

        sac.registerPrototype("simple-action", SimpleAction.class, new MutablePropertyValues());

        ActionConfig actionConfig = new ActionConfig.Builder("jim", "bob", "simple-action").build();
        SimpleAction simpleAction = (SimpleAction) objectFactory.buildBean(actionConfig.getClassName(), null);
View Full Code Here

Examples of com.opensymphony.xwork2.TestBean

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.MODEL_DRIVEN_PARAM_TEST, null, extraContext);
        assertEquals(Action.SUCCESS, proxy.execute());

        ModelDrivenAction action = (ModelDrivenAction) proxy.getAction();
        TestBean model = (TestBean) action.getModel();
        assertEquals(nameVal, model.getName());
        assertEquals(15, model.getCount());
        assertEquals(fooVal, action.getFoo());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.TestBean

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.MODEL_DRIVEN_PARAM_TEST, extraContext);
        assertEquals(Action.SUCCESS, proxy.execute());

        ModelDrivenAction action = (ModelDrivenAction) proxy.getAction();
        TestBean model = (TestBean) action.getModel();

        String property = System.getProperty("xwork.security.test");
        assertNull(property);
    }
View Full Code Here

Examples of com.opensymphony.xwork2.TestBean

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.MODEL_DRIVEN_PARAM_TEST, extraContext);
        assertEquals(Action.SUCCESS, proxy.execute());

        ModelDrivenAction action = (ModelDrivenAction) proxy.getAction();
        TestBean model = (TestBean) action.getModel();
        assertEquals(nameVal, model.getName());
        assertEquals(15, model.getCount());
        assertEquals(fooVal, action.getFoo());
    }
View Full Code Here

Examples of com.sun.faces.TestBean

        populateRequest(theRequest);
    }

    public void testELGet() throws Exception
    {
        TestBean testBean = new TestBean();
        InnerBean newInner, oldInner = new InnerBean();
        testBean.setInner(oldInner);
        Object result = null;
        ExternalContext extContext = getFacesContext().getExternalContext();

        Map myMap = new HashMap();
        TestBean myBean = new TestBean();
        myBean.setOne("one");
        myMap.put("myBean", myBean);
        extContext.getRequestMap().put("myMap", myMap);

        //
        // Get tests
View Full Code Here

Examples of com.toc.dton.junit.sample.object.TestBean

    String parseResult;
    try {
      testList.add("Test String");
      testList.add(1);
      testList.add(null);
      testList.add(new TestBean());
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
View Full Code Here

Examples of eu.planets_project.tb.impl.TestBean

  /* (non-Javadoc)
   * Note: The TestBean test Object must must be the one that is already persisted
   * @see test.eu.planets_project.tb.TesterRemote#updateExistingTestEntry(int, eu.planets_project.tb.impl.TestBean)
   */
  public void updateExistingTestEntry(int pKey, String sName, int htableKey, String htableValue){
    TestBean t_helper = manager.find(TestBean.class, pKey);
    //System.out.println("updating: "+t_helper.getId()+" "+t_helper.getName());
    t_helper.setName(sName);
    t_helper.setKeyValuePairs(htableKey, htableValue);
    manager.persist(t_helper);
  }
View Full Code Here

Examples of examples.TestBean

        parms.put("color", "Red");
        parms.put("fruit", "Apple");
        parms.put("animal", "Rabbit");
        request.setAttribute("parms", parms);

        TestBean bean = new TestBean();
        request.setAttribute("testBean", bean);

        // Just forward to the form - no preparation required
        return mapping.findForward("success");
View Full Code Here

Examples of examples.TestBean

        ActionForm form,
        HttpServletRequest request,
        HttpServletResponse response)
        throws Exception {

        TestBean bean = new TestBean();
        request.setAttribute("testBean", bean);

        ArrayList items = new ArrayList();
        request.setAttribute("items", items);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.