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

Examples of com.inspiresoftware.lib.dto.geda.assembler.examples.synth.TestSynthesizerByClass


   * @throws GeDAException should not be thrown
   */
  @Test
  public void testWriterOnIfaceCdb() throws GeDAException {
   
    final TestSynthesizerByInterface dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "dbo",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
        )   
    );
   
    assertEquals(Double.class, writer.getParameterType());
    writer.write(dto, DO_4);
    assertEquals(DO_4, dto.getDbo());
   
  }
View Full Code Here


   * @throws GeDAException should not be thrown
   */
  @Test
  public void testReaderOnClassCob() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
    dto.setOb(OBJ);
   
    final DataReader reader = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "ob",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testWriterOnClassCob() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "ob",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
        )   
    );
   
    assertEquals(Object.class, writer.getParameterType());
    writer.write(dto, OBJ);
    assertEquals(OBJ, dto.getOb());
   
  }
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testReaderOnIfaceCob() throws GeDAException {
   
    final TestSynthesizerByInterface dto = new TestSynthesizerByClass();
    dto.setOb(OBJ);
   
    final DataReader reader = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "ob",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testWriterOnIfaceCob() throws GeDAException {
   
    final TestSynthesizerByInterface dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "ob",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
        )   
    );
   
    assertEquals(Object.class, writer.getParameterType());
    writer.write(dto, OBJ);
    assertEquals(OBJ, dto.getOb());
   
  }
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testReaderOnClassCstr() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
    dto.setStr(STR);
   
    final DataReader reader = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "str",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testWriterOnClassCstr() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "str",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
        )   
    );
   
    assertEquals(String.class, writer.getParameterType());
    writer.write(dto, STR);
    assertEquals(STR, dto.getStr());
   
  }
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testReaderOnIfaceCstr() throws GeDAException {
   
    final TestSynthesizerByInterface dto = new TestSynthesizerByClass();
    dto.setStr(STR);
   
    final DataReader reader = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "str",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testWriterOnIfaceCstr() throws GeDAException {
   
    final TestSynthesizerByInterface dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "str",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
        )   
    );
   
    assertEquals(String.class, writer.getParameterType());
    writer.write(dto, STR);
    assertEquals(STR, dto.getStr());
   
  }
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testReaderOnClassCenum() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
    dto.setEnum(EnumVal.Three);
   
    final DataReader reader = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "enum",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.assembler.examples.synth.TestSynthesizerByClass

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.