All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.ngeor.yak4j.InvalidFieldExpectationBuilder Maven / Gradle / Ivy

There is a newer version: 0.22.0
Show newest version
package com.github.ngeor.yak4j;

/**
 * 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 - 2024 Weber Informatics LLC | Privacy Policy