Package org.springframework.batch.admin.web

Examples of org.springframework.batch.admin.web.JobInstanceInfo


  public void testJobExecutionsForInstance() throws Exception {
    JobExecution jobExecution = MetaDataInstanceFactory.createJobExecution();
    model.put("jobExecutions", Arrays.asList(new JobExecutionInfo(jobExecution, TimeZone.getTimeZone("GMT"))));
    model.put("baseUrl", "http://localhost:8080/springsource");
    model.put("jobInfo", new JobInfo("foo", 1, 123L, false, false));
    model.put("jobInstanceInfo", new JobInstanceInfo(MetaDataInstanceFactory.createJobInstance("job", 112L), Arrays.asList(jobExecution),
        TimeZone.getTimeZone("GMT")));
    view.render(model, request, response);
    String content = response.getContentAsString();
    //    System.err.println(content);
    assertTrue(content.contains("jobInstance"));
View Full Code Here


  }

  @Test
  public void testJobView() throws Exception {
    model.put("jobInfo", new JobInfo("foo", 1, true));
    model.put("jobInstances", Arrays.asList(new JobInstanceInfo(MetaDataInstanceFactory.createJobInstance("foo",
        1L), new ArrayList<JobExecution>(), TimeZone.getTimeZone("GMT"))));
    model.put("jobParameters", "foo=bar");
    model.put("startJobInstance", 3);
    model.put("endJobInstance", 4);
    model.put("nextJobInstance", 4);
View Full Code Here

  }

  @Test
  public void testJobViewNotLaunchable() throws Exception {
    model.put("job", new JobInfo("foo", 1));
    model.put("jobInstances", Arrays.asList(new JobInstanceInfo(MetaDataInstanceFactory.createJobInstance("foo",
        1L), new ArrayList<JobExecution>(), TimeZone.getTimeZone("GMT"))));
    model.put("launchable", false);
    model.put("startJobInstance", 3);
    model.put("endJobInstance", 4);
    model.put("totalJobInstances", 100);
View Full Code Here

  @Test
  public void testViewWithJob() throws Exception {
    model.put(BindingResult.MODEL_KEY_PREFIX + "launchRequest", errors);
    model.put("jobInfo", new JobInfo("foo", 1));
    model.put("jobInstances", Arrays.asList(new JobInstanceInfo(MetaDataInstanceFactory.createJobInstance("foo",
        1L), new ArrayList<JobExecution>(), TimeZone.getTimeZone("GMT"))));
    model.put("baseUrl", "http://localhost:8080/springsource");
    model.put("startJobInstance", 11);
    model.put("endJobInstance", 30);
    model.put("totalJobInstances", 100);
View Full Code Here

  @Test
  public void testViewWithJobAndNoPagination() throws Exception {
    model.put(BindingResult.MODEL_KEY_PREFIX + "launchRequest", errors);
    model.put("jobInfo", new JobInfo("foo", 1));
    model.put("jobInstances", Arrays.asList(new JobInstanceInfo(MetaDataInstanceFactory.createJobInstance("foo",
        1L), new ArrayList<JobExecution>(), TimeZone.getTimeZone("GMT"))));
    model.put("baseUrl", "http://localhost:8080/springsource");
    model.put("startJobInstance", 11);
    model.put("endJobInstance", 30);
    model.put("totalJobInstances", 100);
View Full Code Here

  @Test
  public void testViewWithJobAndExecutions() throws Exception {
    model.put(BindingResult.MODEL_KEY_PREFIX + "launchRequest", errors);
    model.put("jobInfo", new JobInfo("foo", 1));
    model.put("jobInstances", Arrays.asList(new JobInstanceInfo(MetaDataInstanceFactory.createJobInstance("foo",
        123456789L), Arrays.asList(MetaDataInstanceFactory.createJobExecution()), TimeZone.getTimeZone("GMT"))));
    model.put("baseUrl", "http://localhost:8080/springsource");
    job.render(model, request, response);
    String content = response.getContentAsString();
    //    System.err.println(content);
View Full Code Here

TOP

Related Classes of org.springframework.batch.admin.web.JobInstanceInfo

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.