package container import "testing" func TestInformationManager_New(t *testing.T) { informationManager := NewInformationManager() if informationManager == nil { t.Fatalf("创建失败!") } defaultInformationManager, ok := informationManager.(*DefaultInformationManager) if !ok { t.Fatalf("组件信息管理器类型不正确!") } if len(defaultInformationManager.informationMapping) != 0 { t.Fatalf("组件列表数量错误!") } }