Examples of JsonWrapper


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

    model.put("endJobExecution", 30);
    model.put("totalJobExecutions", 30);
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(2, wrapper.get("jobExecutions", Map.class).size());
    assertEquals(1, wrapper.getMap().size()); // no pages if they are all there
  }
View Full Code Here

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

    model.put("baseUrl", "http://localhost:8080/springsource");
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    assertTrue(content.contains("\"duration\" : \""));
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(0, wrapper.get("stepExecution.commitCount"));
    assertEquals("http://localhost:8080/springsource/jobs/executions/123.json", wrapper.get("jobExecution.resource"));
  }
View Full Code Here

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

    model.put("baseUrl", "http://localhost:8080/springsource");
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    assertTrue(content.contains("\"duration\" : \""));
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(0, wrapper.get("stepExecution.commitCount"));
    assertEquals("http://localhost:8080/springsource/jobs/executions/123.json", wrapper.get("jobExecution.resource"));
    assertEquals(stepExecution.getId(), wrapper.get("stepExecution.id", Long.class));
    assertEquals(stepExecution.getJobExecution().getStatus().toString(), wrapper.get("jobExecution.status"));
    assertEquals(stepExecution.getJobExecutionId(), wrapper.get("jobExecution.id", Long.class));
  }
View Full Code Here

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

    model.put("nextJobInstance", 31);
    model.put("previousJobInstance", 21);
    job.render(model, request, response);
    String content = response.getContentAsString();
    //    System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(1, wrapper.get("job.jobInstances", Map.class).size());
    assertEquals(4, wrapper.get("job", Map.class).size());
    assertEquals(5, wrapper.get("job.page", Map.class).size());
  }
View Full Code Here

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

    model.put("endJobInstance", 30);
    model.put("totalJobInstances", 100);
    job.render(model, request, response);
    String content = response.getContentAsString();
    //    System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(1, wrapper.get("job.jobInstances", Map.class).size());
    assertEquals(3, wrapper.get("job", Map.class).size());
  }
View Full Code Here

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

    errors.reject("no.such.job", "No such Job");
    model.put("baseUrl", "http://localhost:8080/springsource");
    job.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(1, wrapper.get("errors", Map.class).size());
    assertEquals("No such Job", wrapper.get("errors['no.such.job']"));
  }
View Full Code Here

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

    errors.reject("job.already.complete", "Already complete");
    model.put("baseUrl", "http://localhost:8080/springsource");
    job.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(1, wrapper.get("errors", Map.class).size());
    assertEquals("Already complete", wrapper.get("errors['job.already.complete']"));
  }
View Full Code Here

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

        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);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals("STARTING", wrapper.get("job.jobInstances['123456789'].lastJobExecutionStatus", String.class));
  }
View Full Code Here

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

    model.put("nextJob", 31);
    model.put("previousJob", 21);
    jobs.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(2, wrapper.get("jobs.registrations", Map.class).size());
    assertEquals(5, wrapper.get("page", Map.class).size());
  }
View Full Code Here

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

    model.put("endJob", 30);
    model.put("totalJobs", 100);
    jobs.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    JsonWrapper wrapper = new JsonWrapper(content);
    assertEquals(2, wrapper.get("jobs.registrations", Map.class).size());
    assertEquals(1, wrapper.getMap().size()); // no pages
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.