package com.oguerreiro.resilient.service.mapper;

import static com.oguerreiro.resilient.domain.MetadataPropertyAsserts.*;
import static com.oguerreiro.resilient.domain.MetadataPropertyTestSamples.*;

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

class MetadataPropertyMapperTest {

    private MetadataPropertyMapper metadataPropertyMapper;

    @BeforeEach
    void setUp() {
        metadataPropertyMapper = new MetadataPropertyMapperImpl();
    }

    @Test
    void shouldConvertToDtoAndBack() {
        var expected = getMetadataPropertySample1();
        var actual = metadataPropertyMapper.toEntity(metadataPropertyMapper.toDto(expected));
        assertMetadataPropertyAllPropertiesEquals(expected, actual);
    }
}
