MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestHandler_MethodNotFound

Function TestHandler_MethodNotFound

pkg/lsp/server_test.go:344–356  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

342}
343
344func TestHandler_MethodNotFound(t *testing.T) {
345 mock := newMockReadWriter()
346 logger := log.New(io.Discard, "", 0)
347 server := NewServer(mock.input, mock.output, logger)
348
349 _, err := server.handler.HandleRequest("unknown/method", nil)
350 if err == nil {
351 t.Fatal("expected error for unknown method")
352 }
353 if !strings.Contains(err.Error(), "method not found") {
354 t.Errorf("expected 'method not found' error, got %v", err)
355 }
356}
357
358func TestPositionToOffset(t *testing.T) {
359 lines := []string{

Callers

nothing calls this directly

Calls 5

newMockReadWriterFunction · 0.85
NewServerFunction · 0.85
HandleRequestMethod · 0.80
ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected