package com.oguerreiro.resilient.service.mapper;

import static com.oguerreiro.resilient.domain.VariableUnitsAsserts.*;
import static com.oguerreiro.resilient.domain.VariableUnitsTestSamples.*;

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

class VariableUnitsMapperTest {

    private VariableUnitsMapper variableUnitsMapper;

    @BeforeEach
    void setUp() {
        variableUnitsMapper = new VariableUnitsMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getVariableUnitsSample1();
        var actual = variableUnitsMapper.toEntity(variableUnitsMapper.toDto(expected));
        assertVariableUnitsAllPropertiesEquals(expected, actual);
    }
}
