package com.oguerreiro.resilient.service.mapper;

import static com.oguerreiro.resilient.domain.UnitTypeAsserts.*;
import static com.oguerreiro.resilient.domain.UnitTypeTestSamples.*;

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

class UnitTypeMapperTest {

    private UnitTypeMapper unitTypeMapper;

    @BeforeEach
    void setUp() {
        unitTypeMapper = new UnitTypeMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getUnitTypeSample1();
        var actual = unitTypeMapper.toEntity(unitTypeMapper.toDto(expected));
        assertUnitTypeAllPropertiesEquals(expected, actual);
    }
}
