package com.oguerreiro.resilient.domain;

import static org.assertj.core.api.Assertions.assertThat;

public class InputDataUploadLogAsserts {

    /**
     * Asserts that the entity has all properties (fields/relationships) set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertInputDataUploadLogAllPropertiesEquals(InputDataUploadLog expected, InputDataUploadLog actual) {
        assertInputDataUploadLogAutoGeneratedPropertiesEquals(expected, actual);
        assertInputDataUploadLogAllUpdatablePropertiesEquals(expected, actual);
    }

    /**
     * Asserts that the entity has all updatable properties (fields/relationships) set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertInputDataUploadLogAllUpdatablePropertiesEquals(InputDataUploadLog expected, InputDataUploadLog actual) {
        assertInputDataUploadLogUpdatableFieldsEquals(expected, actual);
        assertInputDataUploadLogUpdatableRelationshipsEquals(expected, actual);
    }

    /**
     * Asserts that the entity has all the auto generated properties (fields/relationships) set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertInputDataUploadLogAutoGeneratedPropertiesEquals(InputDataUploadLog expected, InputDataUploadLog actual) {
        assertThat(expected)
            .as("Verify InputDataUploadLog auto generated properties")
            .satisfies(e -> assertThat(e.getId()).as("check id").isEqualTo(actual.getId()));
    }

    /**
     * Asserts that the entity has all the updatable fields set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertInputDataUploadLogUpdatableFieldsEquals(InputDataUploadLog expected, InputDataUploadLog actual) {
        assertThat(expected)
            .as("Verify InputDataUploadLog relevant properties")
            .satisfies(e -> assertThat(e.getLogMessage()).as("check logMessage").isEqualTo(actual.getLogMessage()))
            .satisfies(e -> assertThat(e.getCreationDate()).as("check creationDate").isEqualTo(actual.getCreationDate()))
            .satisfies(e -> assertThat(e.getCreationUsername()).as("check creationUsername").isEqualTo(actual.getCreationUsername()))
            .satisfies(e -> assertThat(e.getVersion()).as("check version").isEqualTo(actual.getVersion()));
    }

    /**
     * Asserts that the entity has all the updatable relationships set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertInputDataUploadLogUpdatableRelationshipsEquals(InputDataUploadLog expected, InputDataUploadLog actual) {
        assertThat(expected)
            .as("Verify InputDataUploadLog relationships")
            .satisfies(e -> assertThat(e.getInputDataUpload()).as("check inputDataUpload").isEqualTo(actual.getInputDataUpload()));
    }
}
