package it.sw.pa.comune.artegna.service.mapper;

import static it.sw.pa.comune.artegna.domain.LiberatoriaAsserts.*;
import static it.sw.pa.comune.artegna.domain.LiberatoriaTestSamples.*;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

class LiberatoriaMapperTest {

    private LiberatoriaMapper liberatoriaMapper;

    @BeforeEach
    void setUp() {
        liberatoriaMapper = new LiberatoriaMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getLiberatoriaSample1();
        var actual = liberatoriaMapper.toEntity(liberatoriaMapper.toDto(expected));
        assertLiberatoriaAllPropertiesEquals(expected, actual);
    }
}
