package core.framework.module;

import core.framework.api.web.service.PUT;
import core.framework.api.web.service.Path;
import core.framework.api.web.service.PathParam;
import core.framework.impl.inject.BeanFactory;
import core.framework.impl.module.ModuleContext;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * @author neo
 */
class APIConfigTest {
    private APIConfig config;

    @BeforeEach
    void createAPIConfig() {
        config = new APIConfig();
        config.initialize(new ModuleContext(new BeanFactory()), null);
    }

    @Test
    void service() {
        config.service(TestWebService.class, new TestWebServiceImpl());

        assertThat(config.serviceInterfaces).containsEntry("TestWebService", TestWebService.class);
    }

    public interface TestWebService {
        @PUT
        @Path("/test/:id")
        void put(@PathParam("id") Integer id);
    }

    public static class TestWebServiceImpl implements TestWebService {
        @Override
        public void put(Integer id) {
        }
    }
}

@@ -257,16 +257,60 @@
 ontext;%0A
+import core.framework.impl.reflect.Classes;%0A
 import o
@@ -833,17 +833,34 @@
 nsEntry(
-%22
+Classes.className(
 TestWebS
@@ -865,17 +865,23 @@
 bService
-%22
+.class)
 , TestWe

fix unit test