Package org.exoplatform.ws.frameworks.json

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


      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getArrayList().size());
      assertTrue(o.getArrayList().get(0).equals(sourceCollection.get(0)));
      assertTrue(o.getArrayList().get(1).equals(sourceCollection.get(1)));
      assertTrue(o.getArrayList().get(2).equals(sourceCollection.get(2)));
   }
View Full Code Here


      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getVector().size());
      assertTrue(o.getVector().get(0).equals(sourceCollection.get(0)));
      assertTrue(o.getVector().get(1).equals(sourceCollection.get(1)));
      assertTrue(o.getVector().get(2).equals(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getLinkedList().size());
      assertTrue(o.getLinkedList().get(0).equals(sourceCollection.get(0)));
      assertTrue(o.getLinkedList().get(1).equals(sourceCollection.get(1)));
      assertTrue(o.getLinkedList().get(2).equals(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getLinkedHashSet().size());
      assertTrue(o.getLinkedHashSet().contains(sourceCollection.get(0)));
      assertTrue(o.getLinkedHashSet().contains(sourceCollection.get(1)));
      assertTrue(o.getLinkedHashSet().contains(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getHashSet().size());
      assertTrue(o.getHashSet().contains(sourceCollection.get(0)));
      assertTrue(o.getHashSet().contains(sourceCollection.get(1)));
      assertTrue(o.getHashSet().contains(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getList().size());
      assertTrue(o.getList().get(0).equals(sourceCollection.get(0)));
      assertTrue(o.getList().get(1).equals(sourceCollection.get(1)));
      assertTrue(o.getList().get(2).equals(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getSet().size());
      assertTrue(o.getSet().contains(sourceCollection.get(0)));
      assertTrue(o.getSet().contains(sourceCollection.get(1)));
      assertTrue(o.getSet().contains(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getQueue().size());
      assertTrue(o.getQueue().contains(sourceCollection.get(0)));
      assertTrue(o.getQueue().contains(sourceCollection.get(1)));
      assertTrue(o.getQueue().contains(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getCollection().size());
      assertTrue(o.getCollection().contains(sourceCollection.get(0)));
      assertTrue(o.getCollection().contains(sourceCollection.get(1)));
      assertTrue(o.getCollection().contains(sourceCollection.get(2)));
   }
View Full Code Here

      JsonDefaultHandler handler = new JsonDefaultHandler();
      jsonParser.parse(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(
         "CollectionTest.txt")), handler);
      JsonValue jsonValue = handler.getJsonObject();

      JavaCollectionBean o = ObjectBuilder.createObject(JavaCollectionBean.class, jsonValue);

      assertEquals(3, o.getArray().length);
      assertTrue(o.getArray()[0].equals(sourceCollection.get(0)));
      assertTrue(o.getArray()[1].equals(sourceCollection.get(1)));
      assertTrue(o.getArray()[2].equals(sourceCollection.get(2)));
   }
View Full Code Here

TOP

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

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.