mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
28 lines
607 B
Go
28 lines
607 B
Go
package module_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/jwetzell/showbridge-go/internal/config"
|
|
"github.com/jwetzell/showbridge-go/internal/module"
|
|
)
|
|
|
|
func TestPSNClientFromRegistry(t *testing.T) {
|
|
registration, ok := module.ModuleRegistry["psn.client"]
|
|
if !ok {
|
|
t.Fatalf("psn.client module not registered")
|
|
}
|
|
|
|
moduleInstance, err := registration.New(config.ModuleConfig{
|
|
Type: "psn.client",
|
|
})
|
|
|
|
if err != nil {
|
|
t.Fatalf("failed to create psn.client module: %s", err)
|
|
}
|
|
|
|
if moduleInstance.Type() != "psn.client" {
|
|
t.Fatalf("psn.client module has wrong type: %s", moduleInstance.Type())
|
|
}
|
|
}
|