package com.emonster.taroaichat.domain;

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

public class TarotCardAsserts {

    /**
     * Asserts that the entity has all properties (fields/relationships) set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertTarotCardAllPropertiesEquals(TarotCard expected, TarotCard actual) {
        assertTarotCardAutoGeneratedPropertiesEquals(expected, actual);
        assertTarotCardAllUpdatablePropertiesEquals(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 assertTarotCardAllUpdatablePropertiesEquals(TarotCard expected, TarotCard actual) {
        assertTarotCardUpdatableFieldsEquals(expected, actual);
        assertTarotCardUpdatableRelationshipsEquals(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 assertTarotCardAutoGeneratedPropertiesEquals(TarotCard expected, TarotCard actual) {
        assertThat(actual)
            .as("Verify TarotCard auto generated properties")
            .satisfies(a -> assertThat(a.getId()).as("check id").isEqualTo(expected.getId()))
            .satisfies(a -> assertThat(a.getCreatedBy()).as("check createdBy").isEqualTo(expected.getCreatedBy()))
            .satisfies(a -> assertThat(a.getCreatedDate()).as("check createdDate").isEqualTo(expected.getCreatedDate()));
    }

    /**
     * Asserts that the entity has all the updatable fields set.
     *
     * @param expected the expected entity
     * @param actual the actual entity
     */
    public static void assertTarotCardUpdatableFieldsEquals(TarotCard expected, TarotCard actual) {
        assertThat(actual)
            .as("Verify TarotCard relevant properties")
            .satisfies(a -> assertThat(a.getName()).as("check name").isEqualTo(expected.getName()))
            .satisfies(a -> assertThat(a.getArcanaType()).as("check arcanaType").isEqualTo(expected.getArcanaType()))
            .satisfies(a -> assertThat(a.getCardNumber()).as("check cardNumber").isEqualTo(expected.getCardNumber()))
            .satisfies(a -> assertThat(a.getImageUrl()).as("check imageUrl").isEqualTo(expected.getImageUrl()))
            .satisfies(a -> assertThat(a.getUprightMeaning()).as("check uprightMeaning").isEqualTo(expected.getUprightMeaning()))
            .satisfies(a -> assertThat(a.getReversedMeaning()).as("check reversedMeaning").isEqualTo(expected.getReversedMeaning()))
            .satisfies(a -> assertThat(a.getKeywords()).as("check keywords").isEqualTo(expected.getKeywords()));
    }

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