(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestRegisterExtractor(t *testing.T) { |
| 50 | // Clear registry for testing |
| 51 | registry.extractors = make(map[string]FileExtractor) |
| 52 | |
| 53 | mock := &MockFileExtractor{protocol: "TEST"} |
| 54 | RegisterExtractor(mock) |
| 55 | |
| 56 | extractor, ok := GetExtractor("TEST") |
| 57 | if !ok { |
| 58 | t.Fatal("Failed to retrieve registered extractor") |
| 59 | } |
| 60 | |
| 61 | if extractor.ProtocolName() != "TEST" { |
| 62 | t.Errorf("Protocol name = %s, want TEST", extractor.ProtocolName()) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | func TestGetExtractor_NotFound(t *testing.T) { |
| 67 | // Clear registry for testing |
nothing calls this directly
no test coverage detected