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

info.novatec.testit.webtester.support.assertj.TableFieldAssert Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package info.novatec.testit.webtester.support.assertj;

import info.novatec.testit.webtester.pageobjects.TableField;


/**
 * Contains assertions for {@link TableField table fields}.
 *
 * @since 0.9.8
 */
public class TableFieldAssert extends AbstractPageObjectAssert {

    public TableFieldAssert(TableField actual) {
        super(actual, TableFieldAssert.class);
    }

    /**
     * Asserts that the {@link TableField table field} is a header field.
     *
     * @return same assertion instance for fluent API
     * @since 0.9.8
     */
    public TableFieldAssert isHeaderField() {
        failOnActualBeingNull();
        if (!actual.isHeaderField()) {
            failWithMessage("Expected table field to be part of the header, but it wasn't.");
        }
        return this;
    }

    /**
     * Asserts that the {@link TableField table field} isn't a header field.
     *
     * @return same assertion instance for fluent API
     * @since 0.9.8
     */
    public TableFieldAssert isNotHeaderField() {
        failOnActualBeingNull();
        if (actual.isHeaderField()) {
            failWithMessage("Expected table field not to be part of the header, but it was");
        }
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy