Package org.springframework.batch.core.configuration.xml

Examples of org.springframework.batch.core.configuration.xml.AbstractTestComponent


    assertTrue(delegate.isExecuted());
  }

  @Test
  public void testRightSignatureNamedMethod() {
    AbstractTestComponent delegate = new AbstractTestComponent() {
      @SuppressWarnings("unused")
      public void aMethod(JobExecution jobExecution) {
        executed = true;
        assertEquals(new Long(25), jobExecution.getId());
      }
    };
    factoryBean.setDelegate(delegate);
    Map<String, String> metaDataMap = new HashMap<String, String>();
    metaDataMap.put(AFTER_JOB.getPropertyName(), "aMethod");
    factoryBean.setMetaDataMap(metaDataMap);
    JobExecutionListener listener = (JobExecutionListener) factoryBean.getObject();
    listener.afterJob(new JobExecution(25L));
    assertTrue(delegate.isExecuted());
  }
View Full Code Here


    assertTrue(delegate.isExecuted());
  }

  @Test(expected = IllegalArgumentException.class)
  public void testWrongSignatureNamedMethod() {
    AbstractTestComponent delegate = new AbstractTestComponent() {
      @SuppressWarnings("unused")
      public void aMethod(Integer item) {
        executed = true;
      }
    };
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.configuration.xml.AbstractTestComponent

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.