Package org.soybeanMilk.web.os

Examples of org.soybeanMilk.web.os.ParamIllegalException


      ArgPrepareExecuteException apee=(ArgPrepareExecuteException)cause;
      Throwable th=apee.getCause();
     
      if(th instanceof ParamIllegalException)
      {
        ParamIllegalException pie=(ParamIllegalException)th;
       
        msg="The parameter [name: \""+pie.getParamName()+"\", value: \""+pie.getParamValue()+"\"]";
       
        Type targetType=pie.getTargetType();
        if(Integer.class.equals(targetType)
            || int.class.equals(targetType))
          msg+=" is not valid integer.";
        else
          msg+=" is invalid";
View Full Code Here


    String name="paramName";
    String value="illegalValue";
   
    request.setParameter(name, value);
   
    ParamIllegalException re=null;
    try
    {
      webObjectSource.get("param."+name, int.class);
    }
    catch(ParamIllegalException e)
    {
      re=e;
    }
   
    Assert.assertEquals(name, re.getParamName());
    Assert.assertEquals(value, re.getParamValue());
    Assert.assertEquals(int.class, re.getTargetType());
  }
View Full Code Here

    request.setParameter("my.myBean.id", new String[]{"1"});
    request.setParameter("my.myBean.name", new String[]{"jack"});
    request.setParameter("my.myBean.yourBean.id", new String[]{value});
    request.setParameter("my.myBean.yourBean.name", new String[]{"tom"});
   
    ParamIllegalException re=null;
    try
    {
      webObjectSource.get("param.my.myBean", MyBean.class);
    }
    catch(ParamIllegalException e)
    {
      re=e;
    }
   
    Assert.assertEquals("my.myBean.yourBean.id", re.getParamName());
    Assert.assertEquals(value, re.getParamValue());
    Assert.assertEquals(Integer.class, re.getTargetType());
  }
View Full Code Here

TOP

Related Classes of org.soybeanMilk.web.os.ParamIllegalException

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.