Package org.jboss.seam.remoting.wrapper

Examples of org.jboss.seam.remoting.wrapper.StringWrapper.convert()


      value = "123.4567";
      wrapper.setElement(createElement("str", value));

      assert Double.valueOf(value).equals(wrapper.convert(Double.class));
      assert Double.valueOf(value).equals(wrapper.convert(Double.TYPE));
      assert Float.valueOf(value).equals(wrapper.convert(Float.class));
      assert Float.valueOf(value).equals(wrapper.convert(Float.TYPE));

      wrapper.setElement(createElement("str", Boolean.toString(true)));
      assert (Boolean) wrapper.convert(Boolean.class);
View Full Code Here


      value = "123.4567";
      wrapper.setElement(createElement("str", value));

      assert Double.valueOf(value).equals(wrapper.convert(Double.class));
      assert Double.valueOf(value).equals(wrapper.convert(Double.TYPE));
      assert Float.valueOf(value).equals(wrapper.convert(Float.class));
      assert Float.valueOf(value).equals(wrapper.convert(Float.TYPE));

      wrapper.setElement(createElement("str", Boolean.toString(true)));
      assert (Boolean) wrapper.convert(Boolean.class);
      assert (Boolean) wrapper.convert(Boolean.TYPE);
View Full Code Here

      wrapper.setElement(createElement("str", value));

      assert Double.valueOf(value).equals(wrapper.convert(Double.class));
      assert Double.valueOf(value).equals(wrapper.convert(Double.TYPE));
      assert Float.valueOf(value).equals(wrapper.convert(Float.class));
      assert Float.valueOf(value).equals(wrapper.convert(Float.TYPE));

      wrapper.setElement(createElement("str", Boolean.toString(true)));
      assert (Boolean) wrapper.convert(Boolean.class);
      assert (Boolean) wrapper.convert(Boolean.TYPE);
View Full Code Here

      assert Double.valueOf(value).equals(wrapper.convert(Double.TYPE));
      assert Float.valueOf(value).equals(wrapper.convert(Float.class));
      assert Float.valueOf(value).equals(wrapper.convert(Float.TYPE));

      wrapper.setElement(createElement("str", Boolean.toString(true)));
      assert (Boolean) wrapper.convert(Boolean.class);
      assert (Boolean) wrapper.convert(Boolean.TYPE);

      wrapper.setElement(createElement("str", Boolean.toString(false)));
      assert !(Boolean) wrapper.convert(Boolean.class);
      assert !(Boolean) wrapper.convert(Boolean.TYPE);
View Full Code Here

      assert Float.valueOf(value).equals(wrapper.convert(Float.class));
      assert Float.valueOf(value).equals(wrapper.convert(Float.TYPE));

      wrapper.setElement(createElement("str", Boolean.toString(true)));
      assert (Boolean) wrapper.convert(Boolean.class);
      assert (Boolean) wrapper.convert(Boolean.TYPE);

      wrapper.setElement(createElement("str", Boolean.toString(false)));
      assert !(Boolean) wrapper.convert(Boolean.class);
      assert !(Boolean) wrapper.convert(Boolean.TYPE);
View Full Code Here

      wrapper.setElement(createElement("str", Boolean.toString(true)));
      assert (Boolean) wrapper.convert(Boolean.class);
      assert (Boolean) wrapper.convert(Boolean.TYPE);

      wrapper.setElement(createElement("str", Boolean.toString(false)));
      assert !(Boolean) wrapper.convert(Boolean.class);
      assert !(Boolean) wrapper.convert(Boolean.TYPE);

      try
      {
         // Attempt an invalid conversion
View Full Code Here

      assert (Boolean) wrapper.convert(Boolean.class);
      assert (Boolean) wrapper.convert(Boolean.TYPE);

      wrapper.setElement(createElement("str", Boolean.toString(false)));
      assert !(Boolean) wrapper.convert(Boolean.class);
      assert !(Boolean) wrapper.convert(Boolean.TYPE);

      try
      {
         // Attempt an invalid conversion
         wrapper.convert(Integer.class);
View Full Code Here

      assert !(Boolean) wrapper.convert(Boolean.TYPE);

      try
      {
         // Attempt an invalid conversion
         wrapper.convert(Integer.class);
         assert false;
      }
      catch (ConversionException ex)
      {
      }
View Full Code Here

      value = "A";
      wrapper.setElement(createElement("str", value));

      assert Character.valueOf(value.charAt(0)).equals(
            wrapper.convert(Character.class));
      assert Character.valueOf(value.charAt(0)).equals(
            wrapper.convert(Character.TYPE));

      value = "green";
      wrapper.setElement(createElement("str", value));
View Full Code Here

      wrapper.setElement(createElement("str", value));

      assert Character.valueOf(value.charAt(0)).equals(
            wrapper.convert(Character.class));
      assert Character.valueOf(value.charAt(0)).equals(
            wrapper.convert(Character.TYPE));

      value = "green";
      wrapper.setElement(createElement("str", value));

      assert TestEnum.valueOf(value).equals(wrapper.convert(TestEnum.class));
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.