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

Examples of com.inspiresoftware.lib.dto.geda.assembler.examples.autowire.TestDto1Interface


   * @throws GeDAException should not be thrown
   */
  @Test
  public void testSynthesizeReaderOnInterface() throws GeDAException {
   
    final TestDto1Interface dto = new TestDto1Class();
    dto.setMyString("Hello");
   
    final DataReader readerMyString = new JavassistMethodSynthesizer(this.getClass().getClassLoader()).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "myString",
            PropertyInspector.getPropertyDescriptorsForClass(TestDto1Interface.class)   
View Full Code Here


   * @throws GeDAException should not be thrown
   */
  @Test
  public void testSynthesizeWriterOnInterface() throws GeDAException {
   
    final TestDto1Interface dto = new TestDto1Class();
    dto.setMyString("Hello");
   
    final DataWriter writerMyString = new JavassistMethodSynthesizer(this.getClass().getClassLoader()).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "myString",
            PropertyInspector.getPropertyDescriptorsForClass(TestDto1Interface.class)   
        )   
    );
   
    assertEquals(String.class, writerMyString.getParameterType());
    writerMyString.write(dto, "Goodbye");
    assertEquals("Goodbye", dto.getMyString());
   
  }
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testSynthesizeReaderOnInterface() throws GeDAException {
   
    final TestDto1Interface dto = new TestDto1Class();
    dto.setMyString("Hello");
   
    final DataReader readerMyString = new BCELMethodSynthesizer(this.getClass().getClassLoader()).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "myString",
            PropertyInspector.getPropertyDescriptorsForClass(TestDto1Interface.class)   
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testSynthesizeWriterOnInterface() throws GeDAException {
   
    final TestDto1Interface dto = new TestDto1Class();
    dto.setMyString("Hello");
   
    final DataWriter writerMyString = new BCELMethodSynthesizer(this.getClass().getClassLoader()).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "myString",
            PropertyInspector.getPropertyDescriptorsForClass(TestDto1Interface.class)   
        )   
    );
   
    assertEquals(String.class, writerMyString.getParameterType());
    writerMyString.write(dto, "Goodbye");
    assertEquals("Goodbye", dto.getMyString());
   
  }
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testSynthesizeReaderOnInterface() throws GeDAException {
   
    final TestDto1Interface dto = new TestDto1Class();
    dto.setMyString("Hello");
   
    final DataReader readerMyString = new SunJavaToolsMethodSynthesizer(this.getClass().getClassLoader(), WORKING_DIRECTORY).synthesizeReader(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "myString",
            PropertyInspector.getPropertyDescriptorsForClass(TestDto1Interface.class)   
View Full Code Here

   * @throws GeDAException should not be thrown
   */
  @Test
  public void testSynthesizeWriterOnInterface() throws GeDAException {
   
    final TestDto1Interface dto = new TestDto1Class();
    dto.setMyString("Hello");
   
    final DataWriter writerMyString = new SunJavaToolsMethodSynthesizer(this.getClass().getClassLoader(), WORKING_DIRECTORY).synthesizeWriter(
        PropertyInspector.getDtoPropertyDescriptorForField(
            TestDto1Interface.class, "myString",
            PropertyInspector.getPropertyDescriptorsForClass(TestDto1Interface.class)   
        )   
    );
   
    assertEquals(String.class, writerMyString.getParameterType());
    writerMyString.write(dto, "Goodbye");
    assertEquals("Goodbye", dto.getMyString());
   
  }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.assembler.examples.autowire.TestDto1Interface

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.