Package org.springframework.batch.core.job.flow

Examples of org.springframework.batch.core.job.flow.FlowExecution.compareTo()


  @Test
  public void testFailed() throws Exception {
    FlowExecution first = new FlowExecution("foo", FlowExecutionStatus.COMPLETED);
    FlowExecution second = new FlowExecution("foo", FlowExecutionStatus.FAILED);
    assertTrue("Should be negative", first.compareTo(second)<0);
    assertTrue("Should be positive", second.compareTo(first)>0);
    assertEquals(FlowExecutionStatus.FAILED, aggregator.aggregate(Arrays.asList(first, second)));
  }

  @Test
  public void testEmpty() throws Exception {
View Full Code Here


  @Test
  public void testAlphaOrdering() throws Exception {
    FlowExecution first = new FlowExecution("foo", new FlowExecutionStatus("BAR"));
    FlowExecution second = new FlowExecution("foo", new FlowExecutionStatus("SPAM"));
    assertTrue("Should be negative",first.compareTo(second)<0);
    assertTrue("Should be positive",second.compareTo(first)>0);
  }

  @Test
  public void testEnumOrdering() throws Exception {
    FlowExecution first = new FlowExecution("foo", FlowExecutionStatus.COMPLETED);
View Full Code Here

  @Test
  public void testEnumOrdering() throws Exception {
    FlowExecution first = new FlowExecution("foo", FlowExecutionStatus.COMPLETED);
    FlowExecution second = new FlowExecution("foo", FlowExecutionStatus.FAILED);
    assertTrue("Should be negative",first.compareTo(second)<0);
    assertTrue("Should be positive",second.compareTo(first)>0);
  }

  @Test
  public void testEnumStartsWithOrdering() throws Exception {
    FlowExecution first = new FlowExecution("foo", new FlowExecutionStatus("COMPLETED.BAR"));
View Full Code Here

  @Test
  public void testEnumStartsWithOrdering() throws Exception {
    FlowExecution first = new FlowExecution("foo", new FlowExecutionStatus("COMPLETED.BAR"));
    FlowExecution second = new FlowExecution("foo", new FlowExecutionStatus("FAILED.FOO"));
    assertTrue("Should be negative",first.compareTo(second)<0);
    assertTrue("Should be positive",second.compareTo(first)>0);
  }

  @Test
  public void testEnumStartsWithAlphaOrdering() throws Exception {
    FlowExecution first = new FlowExecution("foo", new FlowExecutionStatus("COMPLETED.BAR"));
View Full Code Here

  @Test
  public void testEnumStartsWithAlphaOrdering() throws Exception {
    FlowExecution first = new FlowExecution("foo", new FlowExecutionStatus("COMPLETED.BAR"));
    FlowExecution second = new FlowExecution("foo", new FlowExecutionStatus("COMPLETED.FOO"));
    assertTrue("Should be negative",first.compareTo(second)<0);
    assertTrue("Should be positive",second.compareTo(first)>0);
  }

  @Test
  public void testEnumAndAlpha() throws Exception {
    FlowExecution first = new FlowExecution("foo", new FlowExecutionStatus("ZZZZZ"));
View Full Code Here

  @Test
  public void testEnumAndAlpha() throws Exception {
    FlowExecution first = new FlowExecution("foo", new FlowExecutionStatus("ZZZZZ"));
    FlowExecution second = new FlowExecution("foo", new FlowExecutionStatus("FAILED.FOO"));
    assertTrue("Should be negative",first.compareTo(second)<0);
    assertTrue("Should be positive",second.compareTo(first)>0);
  }

}
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.