package com.workfusion.odf.impl.converter.extractor;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertSame;

class DataWrapperTest {

    @Test
    void shouldReturnEmptyAttributesIfNotSpecified() {
        // given
        DataWrapper wrapper = new DataWrapper(null, null, null, null);
        // when
        Map<String, String> actualAttrs = wrapper.getAttributes();
        // then
        assertEquals(Collections.emptyMap(), actualAttrs);
    }

    @Test
    void shouldReturnAttributesIfSpecified() {
        // given
        Map<String, String> expectedAttrs = new HashMap<>();
        DataWrapper wrapper = new DataWrapper(null, null, null, expectedAttrs);
        // when
        Map<String, String> actualAttrs = wrapper.getAttributes();
        // then
        assertSame(expectedAttrs, actualAttrs);
    }

}
