Skip to content

Split ServerHandlerLogicTests.swift (426 lines) into focused per-concern files #26

@kiki830621

Description

@kiki830621

Problem

From verification of #8/#11/#12 by devils-advocate (LOW):
「ServerHandlerLogicTests.swift 已 426 行(CLAUDE.md common-coding-style.md「200-400 lines typical, 800 max」)。

變化軌跡:

每次都「再加一點」,現在已逼近 500 行。」
— Source: team:devils-advocate

Type

enhancement (test refactor)

Expected

依測試對象拆分:

Tests/CheTelegramAllMCPTests/
├── HandlerArgs/
│   ├── ParseMaxMessagesTests.swift  (#8 A1, #20 → ~120 lines)
│   ├── ParseChatIdTests.swift       (#12 → ~80 lines)
│   ├── ParseDateInArgsTests.swift   (#5 → ~70 lines)
│   └── ParseDumpArgsTests.swift     (#13 → ~80 lines)
└── ServerHandlerLogicTests.swift  (剩 default + auto-pagination → ~80 lines)

每個檔案聚焦單一 concern,未來再加 case 不會 monolith 化。

Acceptance

Code Reference

  • Tests/CheTelegramAllMCPTests/ServerHandlerLogicTests.swift (current 426 lines)

Related: #8 (test growth driver)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions