Commit Graph

3 Commits (0e932b4fad82c3daf20abffb45f53a2a1fa30865)

Author SHA1 Message Date
haoliang 6fb571f565 补齐采集地址3个详情子端点(machines/collect-records/raw-json)+修复前端详情页API路径参数 + 新增3个DTO + DI注册 1 week ago
haoliang 16016d0df7 新增CncWebApi.Tests:14个控制器127个测试全部通过
- ControllerFactory:封装14个Controller的创建(含完整Repository→Service→Controller依赖链)
- TestDb:测试数据库辅助(TruncateAll+SeedData+SetRealPasswordHash+辅助查询)
- DatabaseCollection:xUnit串行测试集合(共享cnc_test库)
- 14个Controller测试文件覆盖所有API端点:
  Health(1) + Auth(6) + Brand(15) + Machine(10) + CollectAddress(10) +
  Worker(13) + Dashboard(9) + Settings(15) + Production(6) + Alert(7) +
  Log(4) + ScreenConfig(12) + Screen(11) + Option(8) = 127个测试
- 直接实例化Controller调用方法,不经过HTTP管线
- 使用真实数据库(cnc_test库),与Service.Tests共享同一测试库
1 week ago
haoliang 0ba5cede73 feat: 搭建VS2017解决方案骨架(8项目+前端文件夹),编译通过0错误
- CncDataSystem.sln: 4层源码项目 + 4测试项目 + frontend解决方案文件夹
- CncModels: ApiResponse/PagedResult/PagedQuery/ErrorCode 基础类
- CncRepository: BaseRepository 双库连接管理(BusinessRepository/LogRepository)
- CncService: BusinessException 业务异常基类
- CncWebApi: WebApiConfig路由配置/GlobalExceptionFilter/HealthController/Web.config
- 测试项目: xUnit + Moq + Microsoft.NET.Test.Sdk
- NuGet: Dapper + MySqlConnector + Newtonsoft.Json + log4net + JWT
- 编译: dotnet build 8项目全部通过
1 week ago