package com.emonster.taroaichat.domain;

import static com.emonster.taroaichat.domain.DonationTestSamples.*;
import static com.emonster.taroaichat.domain.TarotSessionTestSamples.*;
import static com.emonster.taroaichat.domain.UserProfileTestSamples.*;
import static org.assertj.core.api.Assertions.assertThat;

import com.emonster.taroaichat.web.rest.TestUtil;
import org.junit.jupiter.api.Test;

class DonationTest {

    @Test
    void equalsVerifier() throws Exception {
        TestUtil.equalsVerifier(Donation.class);
        Donation donation1 = getDonationSample1();
        Donation donation2 = new Donation();
        assertThat(donation1).isNotEqualTo(donation2);

        donation2.setId(donation1.getId());
        assertThat(donation1).isEqualTo(donation2);

        donation2 = getDonationSample2();
        assertThat(donation1).isNotEqualTo(donation2);
    }

    @Test
    void sessionTest() {
        Donation donation = getDonationRandomSampleGenerator();
        TarotSession tarotSessionBack = getTarotSessionRandomSampleGenerator();

        donation.setSession(tarotSessionBack);
        assertThat(donation.getSession()).isEqualTo(tarotSessionBack);

        donation.session(null);
        assertThat(donation.getSession()).isNull();
    }

    @Test
    void userProfileTest() {
        Donation donation = getDonationRandomSampleGenerator();
        UserProfile userProfileBack = getUserProfileRandomSampleGenerator();

        donation.setUserProfile(userProfileBack);
        assertThat(donation.getUserProfile()).isEqualTo(userProfileBack);

        donation.userProfile(null);
        assertThat(donation.getUserProfile()).isNull();
    }
}
