Package org.exoplatform.ws.frameworks.json

Examples of org.exoplatform.ws.frameworks.json.ClassTransfBean


      assertEquals(BookEnum.JUNIT_IN_ACTION.name(), jsonValue.getElement("book").getStringValue());
   }

   public void testBeanClassTransf() throws Exception
   {
      ClassTransfBean be = new ClassTransfBean();
      be.setKlass(ForTestClass000.class);
      JsonValue jsonValue = new JsonGeneratorImpl().createJsonObject(be);
      //System.out.println(jsonValue);
      assertEquals(ForTestClass000.class.getName(), jsonValue.getElement("klass").getStringValue());
   }
View Full Code Here


      JsonParser jsonParser = new JsonParserImpl();
      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new ByteArrayInputStream(source.getBytes()), handler);
      JsonValue jsonValue = handler.getJsonObject();
      //System.out.println(jsonValue);
      ClassTransfBean o = ObjectBuilder.createObject(ClassTransfBean.class, jsonValue);
      assertEquals(ForTestClass001.class, o.getKlass());
   }
View Full Code Here

      assertEquals(BookEnum.JUNIT_IN_ACTION.name(), jsonValue.getElement("book").getStringValue());
   }

   public void testBeanClassTransf() throws Exception
   {
      ClassTransfBean be = new ClassTransfBean();
      be.setKlass(ForTestClass000.class);
      JsonValue jsonValue = new JsonGeneratorImpl().createJsonObject(be);
      assertEquals(ForTestClass000.class.getName(), jsonValue.getElement("klass").getStringValue());
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.ws.frameworks.json.ClassTransfBean

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.