com.github.dreamhead.moco.verification.BetweenVerification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.verification;
import static java.lang.String.format;
public final class BetweenVerification extends AbstractTimesVerification {
private final int min;
private final int max;
public BetweenVerification(final int min, final int max) {
this.min = min;
this.max = max;
}
@Override
protected boolean meet(final int size) {
return size >= min && size <= max;
}
@Override
protected String expectedTip() {
return format("{%d, %d}", min, max);
}
}