MCPcopy
hub / github.com/redis/go-redis / TestProcessorCreation

Function TestProcessorCreation

push/processor_unit_test.go:14–31  ·  view source on GitHub ↗

TestProcessorCreation tests processor creation and initialization

(t *testing.T)

Source from the content-addressed store, hash-verified

12
13// TestProcessorCreation tests processor creation and initialization
14func TestProcessorCreation(t *testing.T) {
15 t.Run("NewProcessor", func(t *testing.T) {
16 processor := NewProcessor()
17 if processor == nil {
18 t.Fatal("NewProcessor should not return nil")
19 }
20 if processor.registry == nil {
21 t.Error("Processor should have a registry")
22 }
23 })
24
25 t.Run("NewVoidProcessor", func(t *testing.T) {
26 voidProcessor := NewVoidProcessor()
27 if voidProcessor == nil {
28 t.Fatal("NewVoidProcessor should not return nil")
29 }
30 })
31}
32
33// TestProcessorHandlerManagement tests handler registration and retrieval
34func TestProcessorHandlerManagement(t *testing.T) {

Callers

nothing calls this directly

Calls 4

NewProcessorFunction · 0.85
NewVoidProcessorFunction · 0.85
RunMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected