@@ -57,3 +57,75 @@ func TestDefaultDispatchTable_IntegratorClasses(t *testing.T) {
5757 t .Errorf ("unexpected: %q" , table ["skills" ].IntegratorClass )
5858 }
5959}
60+
61+ func TestDefaultDispatchTable_IntegrateMethods (t * testing.T ) {
62+ table := dispatch .DefaultDispatchTable ()
63+ cases := map [string ]string {
64+ "prompts" : "integrate_prompts_for_target" ,
65+ "agents" : "integrate_agents_for_target" ,
66+ "commands" : "integrate_commands_for_target" ,
67+ "instructions" : "integrate_instructions_for_target" ,
68+ "hooks" : "integrate_hooks_for_target" ,
69+ "skills" : "integrate_package_skill" ,
70+ }
71+ for key , want := range cases {
72+ if got := table [key ].IntegrateMethod ; got != want {
73+ t .Errorf ("table[%q].IntegrateMethod=%q, want %q" , key , got , want )
74+ }
75+ }
76+ }
77+
78+ func TestDefaultDispatchTable_SyncMethods (t * testing.T ) {
79+ table := dispatch .DefaultDispatchTable ()
80+ perTarget := map [string ]bool {"prompts" : true , "agents" : true , "commands" : true , "instructions" : true }
81+ for key , entry := range table {
82+ if perTarget [key ] {
83+ if entry .SyncMethod != "sync_for_target" {
84+ t .Errorf ("table[%q].SyncMethod=%q, want sync_for_target" , key , entry .SyncMethod )
85+ }
86+ } else {
87+ if entry .SyncMethod != "sync_integration" {
88+ t .Errorf ("table[%q].SyncMethod=%q, want sync_integration" , key , entry .SyncMethod )
89+ }
90+ }
91+ }
92+ }
93+
94+ func TestDefaultDispatchTable_AllIntegratorClassesSet (t * testing.T ) {
95+ table := dispatch .DefaultDispatchTable ()
96+ for key , entry := range table {
97+ if entry .IntegratorClass == "" {
98+ t .Errorf ("table[%q].IntegratorClass is empty" , key )
99+ }
100+ }
101+ }
102+
103+ func TestDefaultDispatchTable_AllIntegrateMethodsSet (t * testing.T ) {
104+ table := dispatch .DefaultDispatchTable ()
105+ for key , entry := range table {
106+ if entry .IntegrateMethod == "" {
107+ t .Errorf ("table[%q].IntegrateMethod is empty" , key )
108+ }
109+ }
110+ }
111+
112+ func TestDefaultDispatchTable_AgentsIntegratorClass (t * testing.T ) {
113+ table := dispatch .DefaultDispatchTable ()
114+ if table ["agents" ].IntegratorClass != "AgentIntegrator" {
115+ t .Errorf ("agents IntegratorClass=%q, want AgentIntegrator" , table ["agents" ].IntegratorClass )
116+ }
117+ }
118+
119+ func TestDefaultDispatchTable_HooksIntegratorClass (t * testing.T ) {
120+ table := dispatch .DefaultDispatchTable ()
121+ if table ["hooks" ].IntegratorClass != "HookIntegrator" {
122+ t .Errorf ("hooks IntegratorClass=%q, want HookIntegrator" , table ["hooks" ].IntegratorClass )
123+ }
124+ }
125+
126+ func TestDefaultDispatchTable_InstructionsIntegratorClass (t * testing.T ) {
127+ table := dispatch .DefaultDispatchTable ()
128+ if table ["instructions" ].IntegratorClass != "InstructionIntegrator" {
129+ t .Errorf ("instructions IntegratorClass=%q, want InstructionIntegrator" , table ["instructions" ].IntegratorClass )
130+ }
131+ }
0 commit comments