package com.oguerreiro.resilient.service.mapper;

import static com.oguerreiro.resilient.domain.VariableClassAsserts.*;
import static com.oguerreiro.resilient.domain.VariableClassTestSamples.*;

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

class VariableClassMapperTest {

    private VariableClassMapper variableClassMapper;

    @BeforeEach
    void setUp() {
        variableClassMapper = new VariableClassMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getVariableClassSample1();
        var actual = variableClassMapper.toEntity(variableClassMapper.toDto(expected));
        assertVariableClassAllPropertiesEquals(expected, actual);
    }
}
