package org.nzbhydra.config;

import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.util.Objects;

/**
 * Abstract base class for {@link NotificationConfigEntry} specific assertions - Generated by CustomAssertionGenerator.
 */
@jakarta.annotation.Generated(value = "assertj-assertions-generator")
public abstract class AbstractNotificationConfigEntryAssert<S extends AbstractNotificationConfigEntryAssert<S, A>, A extends NotificationConfigEntry> extends AbstractObjectAssert<S, A> {

    /**
     * Creates a new <code>{@link AbstractNotificationConfigEntryAssert}</code> to make assertions on actual NotificationConfigEntry.
     *
     * @param actual the NotificationConfigEntry we want to make assertions on.
     */
    protected AbstractNotificationConfigEntryAssert(A actual, Class<S> selfType) {
        super(actual, selfType);
    }

    /**
     * Verifies that the actual NotificationConfigEntry's appriseUrls is equal to the given one.
     *
     * @param appriseUrls the given appriseUrls to compare the actual NotificationConfigEntry's appriseUrls to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NotificationConfigEntry's appriseUrls is not equal to the given one.
     */
    public S hasAppriseUrls(String appriseUrls) {
        // check that actual NotificationConfigEntry we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting appriseUrls of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualAppriseUrls = actual.getAppriseUrls();
        if (!Objects.areEqual(actualAppriseUrls, appriseUrls)) {
            failWithMessage(assertjErrorMessage, actual, appriseUrls, actualAppriseUrls);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NotificationConfigEntry's bodyTemplate is equal to the given one.
     *
     * @param bodyTemplate the given bodyTemplate to compare the actual NotificationConfigEntry's bodyTemplate to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NotificationConfigEntry's bodyTemplate is not equal to the given one.
     */
    public S hasBodyTemplate(String bodyTemplate) {
        // check that actual NotificationConfigEntry we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting bodyTemplate of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualBodyTemplate = actual.getBodyTemplate();
        if (!Objects.areEqual(actualBodyTemplate, bodyTemplate)) {
            failWithMessage(assertjErrorMessage, actual, bodyTemplate, actualBodyTemplate);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NotificationConfigEntry's eventType is equal to the given one.
     *
     * @param eventType the given eventType to compare the actual NotificationConfigEntry's eventType to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NotificationConfigEntry's eventType is not equal to the given one.
     */
    public S hasEventType(org.nzbhydra.config.notification.NotificationEventType eventType) {
        // check that actual NotificationConfigEntry we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting eventType of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        org.nzbhydra.config.notification.NotificationEventType actualEventType = actual.getEventType();
        if (!Objects.areEqual(actualEventType, eventType)) {
            failWithMessage(assertjErrorMessage, actual, eventType, actualEventType);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NotificationConfigEntry's messageType is equal to the given one.
     *
     * @param messageType the given messageType to compare the actual NotificationConfigEntry's messageType to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NotificationConfigEntry's messageType is not equal to the given one.
     */
    public S hasMessageType(NotificationConfigEntry.MessageType messageType) {
        // check that actual NotificationConfigEntry we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting messageType of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        NotificationConfigEntry.MessageType actualMessageType = actual.getMessageType();
        if (!Objects.areEqual(actualMessageType, messageType)) {
            failWithMessage(assertjErrorMessage, actual, messageType, actualMessageType);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NotificationConfigEntry's titleTemplate is equal to the given one.
     *
     * @param titleTemplate the given titleTemplate to compare the actual NotificationConfigEntry's titleTemplate to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NotificationConfigEntry's titleTemplate is not equal to the given one.
     */
    public S hasTitleTemplate(String titleTemplate) {
        // check that actual NotificationConfigEntry we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting titleTemplate of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualTitleTemplate = actual.getTitleTemplate();
        if (!Objects.areEqual(actualTitleTemplate, titleTemplate)) {
            failWithMessage(assertjErrorMessage, actual, titleTemplate, actualTitleTemplate);
        }

        // return the current assertion for method chaining
        return myself;
    }

}
