package com.oguerreiro.resilient.service.mapper;

import static com.oguerreiro.resilient.domain.PeriodVersionAsserts.*;
import static com.oguerreiro.resilient.domain.PeriodVersionTestSamples.*;

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

class PeriodVersionMapperTest {

    private PeriodVersionMapper periodVersionMapper;

    @BeforeEach
    void setUp() {
        periodVersionMapper = new PeriodVersionMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getPeriodVersionSample1();
        var actual = periodVersionMapper.toEntity(periodVersionMapper.toDto(expected));
        assertPeriodVersionAllPropertiesEquals(expected, actual);
    }
}
