Package org.dozer.vo.set

Examples of org.dozer.vo.set.NamesSortedSet


  @Test
  public void testArrayToSortedSet() {
    NamesArray from = newInstance(NamesArray.class);
    String[] names = { "John", "Bill", "Tony", "Fred", "Bruce" };
    from.setNames(names);
    NamesSortedSet to = mapper.map(from, NamesSortedSet.class);

    assertNotNull(to);
    assertEquals(names.length, to.getNames().size());
  }
View Full Code Here


    assertEquals(names.length, to.getNames().size());
  }

  @Test
  public void testSortedSetToArray() {
    NamesSortedSet from = newInstance(NamesSortedSet.class);
    NamesArray to = null;
    SortedSet<String> names = newInstance(TreeSet.class);

    names.add("Jen");
    names.add("Sue");
    names.add("Sally");
    names.add("Jill");
    from.setNames(names);

    to = mapper.map(from, NamesArray.class);

    assertNotNull(to);
    assertEquals(names.size(), to.getNames().length);
View Full Code Here

  }

  @Test
  public void testSetToSortedSet() {
    NamesSet from = newInstance(NamesSet.class);
    NamesSortedSet to = null;
    Set<String> names = newInstance(HashSet.class);

    names.add("Red");
    names.add("Blue");
    names.add("Green");
    from.setNames(names);

    to = mapper.map(from, NamesSortedSet.class);

    assertNotNull(to);
    assertEquals(names.size(), to.getNames().size());
  }
View Full Code Here

    assertEquals(names.size(), to.getNames().size());
  }

  @Test
  public void testSortedSetToSet() {
    NamesSortedSet from = newInstance(NamesSortedSet.class);
    NamesSet to = null;
    SortedSet<String> names = newInstance(TreeSet.class);

    names.add("Bone");
    names.add("White");
    names.add("Beige");
    names.add("Ivory");
    names.add("Cream");
    names.add("Off white");
    from.setNames(names);

    to = mapper.map(from, NamesSet.class);

    assertNotNull(to);
    assertEquals(names.size(), to.getNames().size());
View Full Code Here

  @Test
  public void testArrayToSortedSet() {
    NamesArray from = newInstance(NamesArray.class);
    String[] names = { "John", "Bill", "Tony", "Fred", "Bruce" };
    from.setNames(names);
    NamesSortedSet to = mapper.map(from, NamesSortedSet.class);

    assertNotNull(to);
    assertEquals(names.length, to.getNames().size());
  }
View Full Code Here

    assertEquals(names.length, to.getNames().size());
  }

  @Test
  public void testSortedSetToArray() {
    NamesSortedSet from = newInstance(NamesSortedSet.class);
    NamesArray to = null;
    SortedSet<String> names = newInstance(TreeSet.class);

    names.add("Jen");
    names.add("Sue");
    names.add("Sally");
    names.add("Jill");
    from.setNames(names);

    to = mapper.map(from, NamesArray.class);

    assertNotNull(to);
    assertEquals(names.size(), to.getNames().length);
View Full Code Here

  }

  @Test
  public void testSetToSortedSet() {
    NamesSet from = newInstance(NamesSet.class);
    NamesSortedSet to = null;
    Set<String> names = newInstance(HashSet.class);

    names.add("Red");
    names.add("Blue");
    names.add("Green");
    from.setNames(names);

    to = mapper.map(from, NamesSortedSet.class);

    assertNotNull(to);
    assertEquals(names.size(), to.getNames().size());
  }
View Full Code Here

    assertEquals(names.size(), to.getNames().size());
  }

  @Test
  public void testSortedSetToSet() {
    NamesSortedSet from = newInstance(NamesSortedSet.class);
    NamesSet to = null;
    SortedSet<String> names = newInstance(TreeSet.class);

    names.add("Bone");
    names.add("White");
    names.add("Beige");
    names.add("Ivory");
    names.add("Cream");
    names.add("Off white");
    from.setNames(names);

    to = mapper.map(from, NamesSet.class);

    assertNotNull(to);
    assertEquals(names.size(), to.getNames().size());
View Full Code Here

TOP

Related Classes of org.dozer.vo.set.NamesSortedSet

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.