package com.oguerreiro.resilient.service.mapper;

import static com.oguerreiro.resilient.domain.VariableScopeAsserts.*;
import static com.oguerreiro.resilient.domain.VariableScopeTestSamples.*;

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

class VariableScopeMapperTest {

    private VariableScopeMapper variableScopeMapper;

    @BeforeEach
    void setUp() {
        variableScopeMapper = new VariableScopeMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getVariableScopeSample1();
        var actual = variableScopeMapper.toEntity(variableScopeMapper.toDto(expected));
        assertVariableScopeAllPropertiesEquals(expected, actual);
    }
}
