Package com.inspiresoftware.lib.dto.geda.assembler.extension

Examples of com.inspiresoftware.lib.dto.geda.assembler.extension.DataWriter


  @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


  @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

  @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

  @Test
  public void testWriterOnClassCenum() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "enum",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
        )   
    );
   
    assertEquals(EnumVal.class, writer.getParameterType());
    writer.write(dto, EnumVal.Three);
    assertEquals(EnumVal.Three, dto.getEnum());
   
  }
View Full Code Here

  @Test
  public void testWriterOnIfaceCenum() throws GeDAException {
   
    final TestSynthesizerByInterface dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "enum",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
        )   
    );
   
    assertEquals(EnumVal.class, writer.getParameterType());
    writer.write(dto, EnumVal.Three);
    assertEquals(EnumVal.Three, dto.getEnum());
   
  }
View Full Code Here

   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass() {
     
    };
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            dto.getClass(), "str",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
        )   
    );
   
    assertEquals(String.class, writer.getParameterType());
    writer.write(dto, STR);
    assertEquals(STR, dto.getStr());
   
  }
View Full Code Here

      public void setSh(final short sh) { dto.setSh(sh); }
      public void setSho(final Short sho) { dto.setSho(sho); }
      public void setStr(final String str) { dto.setStr(str); }
    };
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            dto.getClass(), "str",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
        )   
    );
   
    assertEquals(String.class, writer.getParameterType());
    writer.write(dto, STR);
    assertEquals(STR, dto.getStr());
   
  }
View Full Code Here

  @Test
  public void testWriterOnClassPbool() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "bool",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
        )   
    );
   
    assertEquals(Boolean.class, writer.getParameterType());
    writer.write(dto, BB_T);
    assertEquals(BB_T, dto.isBool());
   
  }
View Full Code Here

  @Test
  public void testWriterOnIfacePbool() throws GeDAException {
   
    final TestSynthesizerByInterface dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "bool",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByInterface.class)   
        )   
    );
   
    assertEquals(Boolean.class, writer.getParameterType());
    writer.write(dto, BB_T);
    assertEquals(BB_T, dto.isBool());
   
  }
View Full Code Here

  @Test
  public void testWriterOnClassCbool() throws GeDAException {
   
    final TestSynthesizerByClass dto = new TestSynthesizerByClass();
   
    final DataWriter writer = new MethodSynthesizerProxy(this.getClass().getClassLoader(), this.synthesizer).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "boolo",
            PropertyInspector.getPropertyDescriptorsForClass(TestSynthesizerByClass.class)   
        )   
    );
   
    assertEquals(Boolean.class, writer.getParameterType());
    writer.write(dto, BO_T);
    assertEquals(BO_T, dto.getBoolo());
   
  }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.assembler.extension.DataWriter

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.