Examples of CArray


Examples of org.constretto.model.CArray

  @SuppressWarnings("unchecked")
  @Test
  public void simpleListConversion() {
    final List<CValue> list = new ArrayList<CValue>();
    list.add(new CPrimitive("hei"));
    final List<String> convertedList = (List<String>) ValueConverterRegistry.convert(String.class, String.class, new CArray(list));

    Assert.assertNotNull(convertedList);
    Assert.assertTrue(convertedList.size() == 1);
  }
View Full Code Here

Examples of org.constretto.model.CArray

    final Map<String, CValue> data = new HashMap<String, CValue>();
    data.put("key", new CPrimitive("value"));
    list.add(new CObject(data));

    final List<Map<String, String>> convertedList = (List<Map<String, String>>) ValueConverterRegistry.convert(String.class,
        String.class, new CArray(list));

    Assert.assertNotNull(convertedList);
    Assert.assertTrue(convertedList.size() == 1);
    final Map<String, String> element = convertedList.get(0);
    Assert.assertTrue(element.size() == 1);
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.