(t *testing.T)
| 354 | } |
| 355 | |
| 356 | func TestLogicMemoryMiddleware_Tools(t *testing.T) { |
| 357 | store := logic.NewInMemoryStore() |
| 358 | manager, err := logic.NewManager(&logic.ManagerConfig{Store: store}) |
| 359 | require.NoError(t, err) |
| 360 | |
| 361 | mw, err := NewLogicMemoryMiddleware(&LogicMemoryMiddlewareConfig{ |
| 362 | Manager: manager, |
| 363 | }) |
| 364 | require.NoError(t, err) |
| 365 | |
| 366 | tools := mw.Tools() |
| 367 | assert.Len(t, tools, 2) |
| 368 | |
| 369 | // 验证工具名称 |
| 370 | toolNames := make([]string, len(tools)) |
| 371 | for i, tool := range tools { |
| 372 | toolNames[i] = tool.Name() |
| 373 | } |
| 374 | assert.Contains(t, toolNames, "logic_memory_query") |
| 375 | assert.Contains(t, toolNames, "logic_memory_update") |
| 376 | } |
| 377 | |
| 378 | func TestLogicMemoryMiddleware_GetConfig(t *testing.T) { |
| 379 | store := logic.NewInMemoryStore() |
nothing calls this directly
no test coverage detected