package it.sw.pa.comune.artegna.domain;

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

public class UtenteAppAsserts {

    /**
     * Asserts that the entity has all properties (fields/relationships) set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertUtenteAppAllPropertiesEquals(UtenteApp expected, UtenteApp actual) {
        assertUtenteAppAutoGeneratedPropertiesEquals(expected, actual);
        assertUtenteAppAllUpdatablePropertiesEquals(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 assertUtenteAppAllUpdatablePropertiesEquals(UtenteApp expected, UtenteApp actual) {
        assertUtenteAppUpdatableFieldsEquals(expected, actual);
        assertUtenteAppUpdatableRelationshipsEquals(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 assertUtenteAppAutoGeneratedPropertiesEquals(UtenteApp expected, UtenteApp actual) {
        assertThat(actual)
            .as("Verify UtenteApp auto generated properties")
            .satisfies(a -> assertThat(a.getId()).as("check id").isEqualTo(expected.getId()));
    }

    /**
     * Asserts that the entity has all the updatable fields set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertUtenteAppUpdatableFieldsEquals(UtenteApp expected, UtenteApp actual) {
        assertThat(actual)
            .as("Verify UtenteApp relevant properties")
            .satisfies(a -> assertThat(a.getUsername()).as("check username").isEqualTo(expected.getUsername()))
            .satisfies(a -> assertThat(a.getEmail()).as("check email").isEqualTo(expected.getEmail()))
            .satisfies(a -> assertThat(a.getTelefono()).as("check telefono").isEqualTo(expected.getTelefono()))
            .satisfies(a -> assertThat(a.getRuolo()).as("check ruolo").isEqualTo(expected.getRuolo()))
            .satisfies(a -> assertThat(a.getAttivo()).as("check attivo").isEqualTo(expected.getAttivo()))
            .satisfies(a -> assertThat(a.getNome()).as("check nome").isEqualTo(expected.getNome()))
            .satisfies(a -> assertThat(a.getCognome()).as("check cognome").isEqualTo(expected.getCognome()))
            .satisfies(a -> assertThat(a.getLuogoNascita()).as("check luogoNascita").isEqualTo(expected.getLuogoNascita()))
            .satisfies(a -> assertThat(a.getDataNascita()).as("check dataNascita").isEqualTo(expected.getDataNascita()))
            .satisfies(a -> assertThat(a.getResidente()).as("check residente").isEqualTo(expected.getResidente()))
            .satisfies(a -> assertThat(a.getSocieta()).as("check societa").isEqualTo(expected.getSocieta()))
            .satisfies(a -> assertThat(a.getSede()).as("check sede").isEqualTo(expected.getSede()))
            .satisfies(a -> assertThat(a.getCodfiscale()).as("check codfiscale").isEqualTo(expected.getCodfiscale()))
            .satisfies(a -> assertThat(a.getTelefonoSoc()).as("check telefonoSoc").isEqualTo(expected.getTelefonoSoc()))
            .satisfies(a -> assertThat(a.getEmailSoc()).as("check emailSoc").isEqualTo(expected.getEmailSoc()));
    }

    /**
     * Asserts that the entity has all the updatable relationships set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertUtenteAppUpdatableRelationshipsEquals(UtenteApp expected, UtenteApp actual) {
        // empty method
    }
}
