feat: 补齐模块接口契约与管理 API 文档

This commit is contained in:
Nixevol
2026-09-30 06:36:28 +08:00
parent dd5a331db2
commit 22c56d1f35
23 changed files with 1782 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
package message
import (
"context"
"errors"
"testing"
"git.asio.asia/nixevol/NixMsg/internal/app/port"
"git.asio.asia/nixevol/NixMsg/internal/protocol"
)
func TestStubSubmitNotImplemented(t *testing.T) {
s := NewStub()
_, err := s.Submit(context.Background(), "a", port.ConnInfo{}, &protocol.Send{})
if !errors.Is(err, ErrNotImplemented) {
t.Fatalf("got %v", err)
}
}
func TestStubRecoverNoop(t *testing.T) {
s := NewStub()
if err := s.RecoverOnStart(context.Background()); err != nil {
t.Fatal(err)
}
}