Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public ArbitraryBuilder<T> size(String expression, int minSize, int maxSize) {
@Override
public ArbitraryBuilder<T> size(PropertySelector propertySelector, int minSize, int maxSize) {
if (minSize > maxSize) {
throw new IllegalArgumentException("should be min > max, min : " + minSize + " max : " + maxSize);
throw new IllegalArgumentException("should be min <= max, min : " + minSize + " max : " + maxSize);
}

List<NextNodePredicate> nextNodePredicates = toMonkeyExpression(propertySelector).toNextNodePredicate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public InnerSpec inner(InnerSpec innerSpec) {
*/
public InnerSpec size(int minSize, int maxSize) {
if (minSize > maxSize) {
throw new IllegalArgumentException("should be min > max, min : " + minSize + " max : " + maxSize);
throw new IllegalArgumentException("should be min <= max, min : " + minSize + " max : " + maxSize);
}

this.state.setContainerInfoSnapshot(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ void sizeMinMax() {
void sizeMinIsBiggerThanMax() {
thenThrownBy(() -> SUT.giveMeBuilder(StringListHolder.class).size("values", 5, 1).sample())
.isExactlyInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("should be min > max");
.hasMessageContaining("should be min <= max");
}

@Property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ void sizeMinIsBiggerThanMax() {
// when
thenThrownBy(() -> SUT.giveMeBuilder(ComplexObject.class).size("strList", 5, 1).sample())
.isExactlyInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("should be min > max");
.hasMessageContaining("should be min <= max");
}

@Example
Expand Down
Loading