package com.oguerreiro.resilient.service.mapper;

import static com.oguerreiro.resilient.domain.MetadataValueAsserts.*;
import static com.oguerreiro.resilient.domain.MetadataValueTestSamples.*;

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

class MetadataValueMapperTest {

    private MetadataValueMapper metadataValueMapper;

    @BeforeEach
    void setUp() {
        metadataValueMapper = new MetadataValueMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getMetadataValueSample1();
        var actual = metadataValueMapper.toEntity(metadataValueMapper.toDto(expected));
        assertMetadataValueAllPropertiesEquals(expected, actual);
    }
}
