
com.github.ngeor.spring.InvalidFieldExpectationBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-test-utils Show documentation
Show all versions of spring-test-utils Show documentation
Testing utilities for Spring
The newest version!
package com.github.ngeor.spring;
/**
* Builds an {@link InvalidFieldExpectation}.
*/
@SuppressWarnings("unused")
public final class InvalidFieldExpectationBuilder {
private String field;
private InvalidFieldExpectationBuilder(String field) {
this.field = field;
}
public InvalidFieldExpectation withCode(String code) {
return new InvalidFieldExpectation(field, code);
}
/**
* Creates a new builder for an {@link InvalidFieldExpectation}.
* @param field The name of the field that is expected to be invalid.
* @return A new builder.
*/
public static InvalidFieldExpectationBuilder invalidField(String field) {
return new InvalidFieldExpectationBuilder(field);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy