package com.correx.infrastructure.workflow

import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNull

class LspServerRegistryTest {
    private val registry = LspServerRegistry()

    @Test
    fun `registry maps language extensions to servers`() {
        assertEquals("tsserver", registry.serverFor("src/App.tsx")?.id)
        assertEquals("rust-analyzer", registry.serverFor("src/main.rs")?.id)
        assertEquals("gopls", registry.serverFor("cmd/main.go")?.id)
        assertEquals("clangd", registry.serverFor("src/main.cpp")?.id)
    }

    @Test
    fun `unknown extension falls through`() {
        assertNull(registry.serverFor("README.md"))
    }
}
