This commit is contained in:
vet
2026-05-28 00:16:19 +08:00
commit 52446ccf3f
54 changed files with 4617 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package jobdef
import "testing"
func TestRegistryGetReturnsRegisteredHandler(t *testing.T) {
registry := NewRegistry(SampleHandler{})
handler, ok := registry.Get("sample-handler")
if !ok {
t.Fatal("expected registered handler")
}
if handler.Key() != "sample-handler" {
t.Fatalf("handler key = %q, want sample-handler", handler.Key())
}
}