@Test void getDescriptionForBetween() throws Exception { final String got = between.getDescription(); assertThat(got).isEqualTo("between 2 and 4"); }
public String getDescription() { if (expectedAtLeast == null) return "at most " + expectedAtMost; if (expectedAtMost == null) return "at least " + expectedAtLeast; if (expectedAtLeast == expectedAtMost) return "equal to " + expectedAtLeast; return format("between %s and %s", expectedAtLeast, expectedAtMost); }
InvocationVerificationCriteria { public String getDescription() { if (expectedAtLeast == null) return "at most " + expectedAtMost; if (expectedAtMost == null) return "at least " + expectedAtLeast; if (expectedAtLeast == expectedAtMost) return "equal to " + expectedAtLeast; return format("between %s and %s", expectedAtLeast, expectedAtMost); } }
InvocationVerificationCriteria { public String getDescription() { if (expectedAtLeast == null) return "at most " + expectedAtMost; if (expectedAtMost == null) return "at least " + expectedAtLeast; if (expectedAtLeast == expectedAtMost) return "equal to " + expectedAtLeast; return format("between %s and %s", expectedAtLeast, expectedAtMost); } private  InvocationVerificationCriteria(Integer expectedAtLeast,
                                           Integer expectedAtMost); }
InvocationVerificationCriteria { public String getDescription() { if (expectedAtLeast == null) return "at most " + expectedAtMost; if (expectedAtMost == null) return "at least " + expectedAtLeast; if (expectedAtLeast == expectedAtMost) return "equal to " + expectedAtLeast; return format("between %s and %s", expectedAtLeast, expectedAtMost); } private  InvocationVerificationCriteria(Integer expectedAtLeast,
                                           Integer expectedAtMost); static InvocationVerificationCriteria atLeast(int times); static InvocationVerificationCriteria atMost(int times); static InvocationVerificationCriteria equalTo(int times); static InvocationVerificationCriteria between(int atLeast, int atMost); void verify(int times); String getDescription(); @Override boolean equals(Object o); @Override int hashCode(); }
InvocationVerificationCriteria { public String getDescription() { if (expectedAtLeast == null) return "at most " + expectedAtMost; if (expectedAtMost == null) return "at least " + expectedAtLeast; if (expectedAtLeast == expectedAtMost) return "equal to " + expectedAtLeast; return format("between %s and %s", expectedAtLeast, expectedAtMost); } private  InvocationVerificationCriteria(Integer expectedAtLeast,
                                           Integer expectedAtMost); static InvocationVerificationCriteria atLeast(int times); static InvocationVerificationCriteria atMost(int times); static InvocationVerificationCriteria equalTo(int times); static InvocationVerificationCriteria between(int atLeast, int atMost); void verify(int times); String getDescription(); @Override boolean equals(Object o); @Override int hashCode();  }