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

import static it.sw.pa.comune.artegna.domain.ConfermaTestSamples.*;
import static it.sw.pa.comune.artegna.domain.NotificaTestSamples.*;
import static org.assertj.core.api.Assertions.assertThat;

import it.sw.pa.comune.artegna.web.rest.TestUtil;
import org.junit.jupiter.api.Test;

class NotificaTest {

    @Test
    void equalsVerifier() throws Exception {
        TestUtil.equalsVerifier(Notifica.class);
        Notifica notifica1 = getNotificaSample1();
        Notifica notifica2 = new Notifica();
        assertThat(notifica1).isNotEqualTo(notifica2);

        notifica2.setId(notifica1.getId());
        assertThat(notifica1).isEqualTo(notifica2);

        notifica2 = getNotificaSample2();
        assertThat(notifica1).isNotEqualTo(notifica2);
    }

    @Test
    void confermaTest() {
        Notifica notifica = getNotificaRandomSampleGenerator();
        Conferma confermaBack = getConfermaRandomSampleGenerator();

        notifica.setConferma(confermaBack);
        assertThat(notifica.getConferma()).isEqualTo(confermaBack);

        notifica.conferma(null);
        assertThat(notifica.getConferma()).isNull();
    }
}
