package be.ehealth.technicalconnector.utils;

import be.fgov.ehealth.technicalconnector.tests.utils.LoggingUtils;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import java.util.Set;

@Slf4j
public class ResourceValueRegistryTest {

    @BeforeClass
    public static void beforeAll() {
        LoggingUtils.bootstrap();
    }

    @Test
    public void testBootstrap() {
        Set<String> result = ResourceValueRegistry.load("META-INF/connector.bootstrap");
        result.forEach(log::info);
        Assert.assertNotNull(result);
        Assert.assertEquals(3, result.size());
    }

    @Test
    public void testServices() {
        Set<String> result = ResourceValueRegistry.load("META-INF/connector.services");
        result.forEach(log::info);
        Assert.assertNotNull(result);
        Assert.assertEquals(8, result.size());
    }

}