MCPcopy Create free account

hub / github.com/TGlimmer/TG_walletbot / functions

Functions2,200 in github.com/TGlimmer/TG_walletbot

FunctionTestNewGrpcBlockClient_仅自定义单次超时
TestNewGrpcBlockClient_仅自定义单次超时 验证只配置单次超时时批量超时使用默认值
internal/infrastructure/tron/grpc_client_test.go:173
FunctionTestNewGrpcBlockClient_自定义端点
TestNewGrpcBlockClient_自定义端点 验证配置的自定义 endpoint 生效
internal/infrastructure/tron/grpc_client_test.go:141
FunctionTestNewGrpcBlockClient_自定义超时
TestNewGrpcBlockClient_自定义超时 验证自定义超时参数生效
internal/infrastructure/tron/grpc_client_test.go:163
FunctionTestNewGrpcBlockClient_默认端点
TestNewGrpcBlockClient_默认端点 验证未配置 endpoint 时使用默认值
internal/infrastructure/tron/grpc_client_test.go:129
FunctionTestNewGrpcBlockClient_默认超时
--- timeout 配置测试 --- TestNewGrpcBlockClient_默认超时 验证未指定超时参数时使用默认值
internal/infrastructure/tron/grpc_client_test.go:153
FunctionTestNewInsufficientBalance
---------- 钱包业务错误构造函数测试 ----------
pkg/errors/errors_test.go:186
FunctionTestNewInternal
(t *testing.T)
pkg/errors/errors_test.go:80
FunctionTestNewInternal_NilErr
(t *testing.T)
pkg/errors/errors_test.go:88
FunctionTestNewInvalidAddress
(t *testing.T)
pkg/errors/errors_test.go:235
FunctionTestNewMaintenanceMode
(t *testing.T)
pkg/errors/errors_test.go:265
FunctionTestNewMerchantService
==================== NewMerchantService 构造测试 ====================
internal/domain/service/merchant_service_test.go:598
FunctionTestNewNotFound
(t *testing.T)
pkg/errors/errors_test.go:36
FunctionTestNewPINInvalid
(t *testing.T)
pkg/errors/errors_test.go:193
FunctionTestNewPINLocked
(t *testing.T)
pkg/errors/errors_test.go:199
FunctionTestNewPINNotSet
(t *testing.T)
pkg/errors/errors_test.go:205
FunctionTestNewProfileUseCase
==================== 构造函数测试 ====================
internal/app/profile_usecase_test.go:161
FunctionTestNewRateLimited
(t *testing.T)
pkg/errors/errors_test.go:259
FunctionTestNewRecipientNotFound
(t *testing.T)
pkg/errors/errors_test.go:253
FunctionTestNewRedPacketService
==================== NewRedPacketService 构造测试 ====================
internal/domain/service/redpacket_service_test.go:56
FunctionTestNewTransferService
==================== NewTransferService 构造测试 ====================
internal/domain/service/transfer_service_test.go:284
FunctionTestNewTransferToSelf
(t *testing.T)
pkg/errors/errors_test.go:247
FunctionTestNewTransferUseCase
==================== 构造函数测试 ====================
internal/app/transfer_usecase_test.go:391
FunctionTestNewUnauthorized
(t *testing.T)
pkg/errors/errors_test.go:22
FunctionTestNewUserFrozen
(t *testing.T)
pkg/errors/errors_test.go:211
FunctionTestNewUserUseCase
==================== 构造函数测试 ====================
internal/app/user_usecase_test.go:236
FunctionTestNewWithdrawBelowMin
(t *testing.T)
pkg/errors/errors_test.go:217
FunctionTestNewWithdrawDailyExceeded
(t *testing.T)
pkg/errors/errors_test.go:229
FunctionTestNewWithdrawExceedMax
(t *testing.T)
pkg/errors/errors_test.go:223
FunctionTestNewWithdrawalSender_创建成功
--- NewWithdrawalSender 测试 --- TestNewWithdrawalSender_创建成功 验证 WithdrawalSender 正确初始化
internal/infrastructure/tron/sender_test.go:150
FunctionTestNewWithdrawalUseCase
==================== 构造函数测试 ====================
internal/app/withdrawal_usecase_test.go:265
FunctionTestNotFound
(t *testing.T)
pkg/response/response_test.go:264
FunctionTestParams_Offset
---------- Params.Offset() 测试 ----------
pkg/pagination/pagination_test.go:18
FunctionTestParseIDParam_Invalid
TestParseIDParam_Invalid 测试无效 ID 参数
internal/adapter/handler/admin_routes_test.go:120
FunctionTestParseIDParam_Valid
TestParseIDParam_Valid 测试有效 ID 参数
internal/adapter/handler/admin_routes_test.go:102
FunctionTestParsePagination_CustomValues
TestParsePagination_CustomValues 测试自定义分页参数
internal/adapter/handler/admin_routes_test.go:34
FunctionTestParsePagination_Defaults
--- admin_routes 测试 --- RegisterAdminRoutes 需要完整的依赖 (Config, Container, DB), 属于集成测试范畴。此处仅验证辅助函数的正确性。 TestParsePagination_Defaults 测试默认分页参数
internal/adapter/handler/admin_routes_test.go:17
FunctionTestParsePagination_InvalidValues
TestParsePagination_InvalidValues 测试无效分页参数 (回退默认)
internal/adapter/handler/admin_routes_test.go:51
FunctionTestParsePagination_SizeTooLarge
TestParsePagination_SizeTooLarge 测试 size 超过最大值 (回退默认)
internal/adapter/handler/admin_routes_test.go:68
FunctionTestParsePagination_ZeroPage
TestParsePagination_ZeroPage 测试 page=0 (回退默认)
internal/adapter/handler/admin_routes_test.go:85
FunctionTestParseToken_Claims字段完整性
(t *testing.T)
internal/adapter/middleware/jwt_test.go:98
FunctionTestParseToken_使用错误密钥解析失败
(t *testing.T)
internal/adapter/middleware/jwt_test.go:54
FunctionTestParseToken_无效Token格式
(t *testing.T)
internal/adapter/middleware/jwt_test.go:83
FunctionTestParseToken_过期Token解析失败
(t *testing.T)
internal/adapter/middleware/jwt_test.go:63
FunctionTestProcessBlockData_失败交易跳过
TestProcessBlockData_失败交易跳过 验证失败的交易不被处理
internal/infrastructure/tron/monitor_test.go:251
FunctionTestProcessBlockData_混合交易类型
TestProcessBlockData_混合交易类型 验证区块内包含多种交易类型的处理
internal/infrastructure/tron/monitor_test.go:590
FunctionTestProcessBlockData_空区块
TestProcessBlockData_空区块 验证空区块返回 0 充值
internal/infrastructure/tron/monitor_test.go:215
FunctionTestProcessBlockData_非监控地址跳过
TestProcessBlockData_非监控地址跳过 验证转入非监控地址的交易不被处理
internal/infrastructure/tron/monitor_test.go:280
FunctionTestProcessTRC20FromData_收款地址不在监控列表
TestProcessTRC20FromData_收款地址不在监控列表 验证收款地址非监控地址时跳过
internal/infrastructure/tron/monitor_test.go:395
FunctionTestProcessTRC20FromData_数据长度不足跳过
TestProcessTRC20FromData_数据长度不足跳过 验证 data 长度不足 136 字符时被跳过
internal/infrastructure/tron/monitor_test.go:339
FunctionTestProcessTRC20FromData_解析地址和金额
TestProcessTRC20FromData_解析地址和金额 验证 TRC20 transfer data 解析的地址和金额正确性
internal/infrastructure/tron/monitor_test.go:367
FunctionTestProcessTRC20FromData_金额为零跳过
TestProcessTRC20FromData_金额为零跳过 验证金额为零时跳过
internal/infrastructure/tron/monitor_test.go:421
FunctionTestProcessTRC20FromData_非USDT合约跳过
TestProcessTRC20FromData_非USDT合约跳过 验证非 USDT 合约的 TRC20 交易被跳过
internal/infrastructure/tron/monitor_test.go:307
FunctionTestProcessTRC20FromData_非transfer方法跳过
TestProcessTRC20FromData_非transfer方法跳过 验证非 transfer 方法的合约调用被跳过
internal/infrastructure/tron/monitor_test.go:323
FunctionTestProcessTRXFromData_地址不在监控列表
TestProcessTRXFromData_地址不在监控列表 验证非监控地址被正确跳过
internal/infrastructure/tron/monitor_test.go:479
FunctionTestProcessTRXFromData_金额验证
TestProcessTRXFromData_金额验证 验证 TRX 充值的金额边界处理
internal/infrastructure/tron/monitor_test.go:448
FunctionTestProfileService_GetBills_ALL币种不筛选
(t *testing.T)
internal/domain/service/profile_service_test.go:134
FunctionTestProfileService_GetBills_分页计算
(t *testing.T)
internal/domain/service/profile_service_test.go:148
FunctionTestProfileService_GetBills_带币种筛选
(t *testing.T)
internal/domain/service/profile_service_test.go:117
FunctionTestProfileService_GetBills_成功
==================== GetBills 测试 ====================
internal/domain/service/profile_service_test.go:96
FunctionTestProfileService_GetBills_查询失败
(t *testing.T)
internal/domain/service/profile_service_test.go:186
FunctionTestProfileService_GetProfileInfo_成功
==================== GetProfileInfo 测试 ====================
internal/domain/service/profile_service_test.go:30
FunctionTestProfileService_GetProfileInfo_查询用户失败
(t *testing.T)
internal/domain/service/profile_service_test.go:66
FunctionTestProfileService_GetProfileInfo_查询钱包失败
(t *testing.T)
internal/domain/service/profile_service_test.go:79
FunctionTestProfileService_GetProfileInfo_用户不存在
(t *testing.T)
internal/domain/service/profile_service_test.go:53
FunctionTestProfileService_GetSmallFreeInfo_无配置返回默认值
(t *testing.T)
internal/domain/service/profile_service_test.go:267
FunctionTestProfileService_GetSmallFreeInfo_有配置
==================== GetSmallFreeInfo 测试 ====================
internal/domain/service/profile_service_test.go:248
FunctionTestProfileService_GetSmallFreeInfo_查询失败
(t *testing.T)
internal/domain/service/profile_service_test.go:281
FunctionTestProfileService_GetWithdrawalHistory_分页修正
(t *testing.T)
internal/domain/service/profile_service_test.go:220
FunctionTestProfileService_GetWithdrawalHistory_成功
==================== GetWithdrawalHistory 测试 ====================
internal/domain/service/profile_service_test.go:201
FunctionTestProfileService_GetWithdrawalHistory_查询失败
(t *testing.T)
internal/domain/service/profile_service_test.go:233
FunctionTestProfileService_UpdateSmallFreeLimit_不支持的币种
(t *testing.T)
internal/domain/service/profile_service_test.go:344
FunctionTestProfileService_UpdateSmallFreeLimit_更新TRX
(t *testing.T)
internal/domain/service/profile_service_test.go:315
FunctionTestProfileService_UpdateSmallFreeLimit_更新USDT
==================== UpdateSmallFreeLimit 测试 ====================
internal/domain/service/profile_service_test.go:296
FunctionTestProfileService_UpdateSmallFreeLimit_查询配置失败
(t *testing.T)
internal/domain/service/profile_service_test.go:372
FunctionTestProfileService_UpdateSmallFreeLimit_设置为零_关闭免密
(t *testing.T)
internal/domain/service/profile_service_test.go:384
FunctionTestProfileService_UpdateSmallFreeLimit_负数金额
(t *testing.T)
internal/domain/service/profile_service_test.go:334
FunctionTestProfileService_UpdateSmallFreeLimit_配置不存在_创建新配置
(t *testing.T)
internal/domain/service/profile_service_test.go:357
FunctionTestProfileUseCase_GetBills_成功
==================== GetBills 测试 ====================
internal/app/profile_usecase_test.go:67
FunctionTestProfileUseCase_GetBills_查询失败
(t *testing.T)
internal/app/profile_usecase_test.go:82
FunctionTestProfileUseCase_GetProfileDashboard_成功
==================== GetProfileDashboard 测试 ====================
internal/app/profile_usecase_test.go:36
FunctionTestProfileUseCase_GetProfileDashboard_查询失败
(t *testing.T)
internal/app/profile_usecase_test.go:53
FunctionTestProfileUseCase_GetSmallFreeInfo_成功
==================== GetSmallFreeInfo 测试 ====================
internal/app/profile_usecase_test.go:113
FunctionTestProfileUseCase_GetWithdrawalHistory_成功
==================== GetWithdrawalHistory 测试 ====================
internal/app/profile_usecase_test.go:96
FunctionTestProfileUseCase_UpdateSmallFreeLimit_失败
(t *testing.T)
internal/app/profile_usecase_test.go:148
FunctionTestProfileUseCase_UpdateSmallFreeLimit_成功
==================== UpdateSmallFreeLimit 测试 ====================
internal/app/profile_usecase_test.go:132
FunctionTestRedPacketClaim_TableName
(t *testing.T)
internal/domain/entity/entity_test.go:703
FunctionTestRedPacketCover_TableName
(t *testing.T)
internal/domain/entity/entity_test.go:710
FunctionTestRedPacketHandler_Detail_ClaimsError
TestRedPacketHandler_Detail_ClaimsError 测试查询领取记录出错
internal/adapter/handler/admin_redpacket_test.go:153
FunctionTestRedPacketHandler_Detail_InvalidID
TestRedPacketHandler_Detail_InvalidID 测试无效红包 ID
internal/adapter/handler/admin_redpacket_test.go:96
FunctionTestRedPacketHandler_Detail_NotFound
TestRedPacketHandler_Detail_NotFound 测试红包不存在
internal/adapter/handler/admin_redpacket_test.go:115
FunctionTestRedPacketHandler_Detail_RepoError
TestRedPacketHandler_Detail_RepoError 测试查询红包出错
internal/adapter/handler/admin_redpacket_test.go:134
FunctionTestRedPacketHandler_Detail_Success
TestRedPacketHandler_Detail_Success 测试获取红包详情成功
internal/adapter/handler/admin_redpacket_test.go:34
FunctionTestRedPacketHandler_New
--- AdminRedPacketHandler 测试 --- 注意: List 和 Stats 方法内部使用 h.db 直接查询,需要真实 DB 才能测试。 此处仅测试 Detail 方法 (通过 repo) 和构造函数。 TestRedPacketHandler_New 测试构造函数
internal/adapter/handler/admin_redpacket_test.go:22
FunctionTestRedPacketService_AddCover_创建失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:673
FunctionTestRedPacketService_AddCover_成功
==================== AddCover 测试 ====================
internal/domain/service/redpacket_service_test.go:653
FunctionTestRedPacketService_ClaimRedPacket_Redis加锁失败
==================== ClaimRedPacket 领取前校验测试 ====================
internal/domain/service/redpacket_service_test.go:686
FunctionTestRedPacketService_ClaimRedPacket_已领取过
(t *testing.T)
internal/domain/service/redpacket_service_test.go:822
FunctionTestRedPacketService_ClaimRedPacket_查询领取记录失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:848
FunctionTestRedPacketService_ClaimRedPacket_红包不存在
(t *testing.T)
internal/domain/service/redpacket_service_test.go:712
FunctionTestRedPacketService_ClaimRedPacket_红包已过期
(t *testing.T)
internal/domain/service/redpacket_service_test.go:777
← previousnext →1,701–1,800 of 2,200, ranked by callers