Package com.inspiresoftware.lib.dto.geda.assembler.examples.converter

Examples of com.inspiresoftware.lib.dto.geda.assembler.examples.converter.TestDto3Class


   *
   * @throws GeDAException exception
   */
  @Test
  public void testWithConversion() throws GeDAException {
    final TestDto3Class dto = new TestDto3Class();
    final TestEntity3Class entity = new TestEntity3Class();
    entity.setDecision(true);
    final ValueConverter conv3toDto = new TestConverter3();
    final Map<String, Object> converters = new HashMap<String, Object>();
    converters.put("boolToEnum", conv3toDto);
   
    final Assembler assembler =
      DTOAssembler.newCustomAssembler(TestDto3Class.class, TestEntity3Class.class, synthesizer);
   
    assembler.assembleDto(dto, entity, converters, null);
   
    assertEquals(Decision.Decided, dto.getMyEnum());
   
    dto.setMyEnum(Decision.Undecided);
   
    assembler.assembleEntity(dto, entity, converters, null);
     
  }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.assembler.examples.converter.TestDto3Class

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.