Package org.springside.modules.unit.utils.reflection.ReflectionUtilsTest

Examples of org.springside.modules.unit.utils.reflection.ReflectionUtilsTest.TestBean3


public class CovertUtilsTest {

  @SuppressWarnings("unchecked")
  @Test
  public void convertElementPropertyToString() {
    TestBean3 bean1 = new TestBean3();
    bean1.setId(1);
    TestBean3 bean2 = new TestBean3();
    bean2.setId(2);

    List list = Lists.newArrayList(bean1, bean2);

    assertEquals("1,2", ConvertUtils.convertElementPropertyToString(list, "id", ","));
  }
View Full Code Here


  }

  @SuppressWarnings("unchecked")
  @Test
  public void convertElementPropertyToList() {
    TestBean3 bean1 = new TestBean3();
    bean1.setId(1);
    TestBean3 bean2 = new TestBean3();
    bean2.setId(2);

    List list = Lists.newArrayList(bean1, bean2);
    List<String> result = ConvertUtils.convertElementPropertyToList(list, "id");
    assertEquals(2, result.size());
    assertEquals(1, result.get(0));
View Full Code Here

TOP

Related Classes of org.springside.modules.unit.utils.reflection.ReflectionUtilsTest.TestBean3

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.