Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TGlimmer/TG_walletbot
/ functions
Functions
2,200 in github.com/TGlimmer/TG_walletbot
⨍
Functions
2,200
◇
Types & classes
325
Function
TestNewGrpcBlockClient_仅自定义单次超时
TestNewGrpcBlockClient_仅自定义单次超时 验证只配置单次超时时批量超时使用默认值
internal/infrastructure/tron/grpc_client_test.go:173
Function
TestNewGrpcBlockClient_自定义端点
TestNewGrpcBlockClient_自定义端点 验证配置的自定义 endpoint 生效
internal/infrastructure/tron/grpc_client_test.go:141
Function
TestNewGrpcBlockClient_自定义超时
TestNewGrpcBlockClient_自定义超时 验证自定义超时参数生效
internal/infrastructure/tron/grpc_client_test.go:163
Function
TestNewGrpcBlockClient_默认端点
TestNewGrpcBlockClient_默认端点 验证未配置 endpoint 时使用默认值
internal/infrastructure/tron/grpc_client_test.go:129
Function
TestNewGrpcBlockClient_默认超时
--- timeout 配置测试 --- TestNewGrpcBlockClient_默认超时 验证未指定超时参数时使用默认值
internal/infrastructure/tron/grpc_client_test.go:153
Function
TestNewInsufficientBalance
---------- 钱包业务错误构造函数测试 ----------
pkg/errors/errors_test.go:186
Function
TestNewInternal
(t *testing.T)
pkg/errors/errors_test.go:80
Function
TestNewInternal_NilErr
(t *testing.T)
pkg/errors/errors_test.go:88
Function
TestNewInvalidAddress
(t *testing.T)
pkg/errors/errors_test.go:235
Function
TestNewMaintenanceMode
(t *testing.T)
pkg/errors/errors_test.go:265
Function
TestNewMerchantService
==================== NewMerchantService 构造测试 ====================
internal/domain/service/merchant_service_test.go:598
Function
TestNewNotFound
(t *testing.T)
pkg/errors/errors_test.go:36
Function
TestNewPINInvalid
(t *testing.T)
pkg/errors/errors_test.go:193
Function
TestNewPINLocked
(t *testing.T)
pkg/errors/errors_test.go:199
Function
TestNewPINNotSet
(t *testing.T)
pkg/errors/errors_test.go:205
Function
TestNewProfileUseCase
==================== 构造函数测试 ====================
internal/app/profile_usecase_test.go:161
Function
TestNewRateLimited
(t *testing.T)
pkg/errors/errors_test.go:259
Function
TestNewRecipientNotFound
(t *testing.T)
pkg/errors/errors_test.go:253
Function
TestNewRedPacketService
==================== NewRedPacketService 构造测试 ====================
internal/domain/service/redpacket_service_test.go:56
Function
TestNewTransferService
==================== NewTransferService 构造测试 ====================
internal/domain/service/transfer_service_test.go:284
Function
TestNewTransferToSelf
(t *testing.T)
pkg/errors/errors_test.go:247
Function
TestNewTransferUseCase
==================== 构造函数测试 ====================
internal/app/transfer_usecase_test.go:391
Function
TestNewUnauthorized
(t *testing.T)
pkg/errors/errors_test.go:22
Function
TestNewUserFrozen
(t *testing.T)
pkg/errors/errors_test.go:211
Function
TestNewUserUseCase
==================== 构造函数测试 ====================
internal/app/user_usecase_test.go:236
Function
TestNewWithdrawBelowMin
(t *testing.T)
pkg/errors/errors_test.go:217
Function
TestNewWithdrawDailyExceeded
(t *testing.T)
pkg/errors/errors_test.go:229
Function
TestNewWithdrawExceedMax
(t *testing.T)
pkg/errors/errors_test.go:223
Function
TestNewWithdrawalSender_创建成功
--- NewWithdrawalSender 测试 --- TestNewWithdrawalSender_创建成功 验证 WithdrawalSender 正确初始化
internal/infrastructure/tron/sender_test.go:150
Function
TestNewWithdrawalUseCase
==================== 构造函数测试 ====================
internal/app/withdrawal_usecase_test.go:265
Function
TestNotFound
(t *testing.T)
pkg/response/response_test.go:264
Function
TestParams_Offset
---------- Params.Offset() 测试 ----------
pkg/pagination/pagination_test.go:18
Function
TestParseIDParam_Invalid
TestParseIDParam_Invalid 测试无效 ID 参数
internal/adapter/handler/admin_routes_test.go:120
Function
TestParseIDParam_Valid
TestParseIDParam_Valid 测试有效 ID 参数
internal/adapter/handler/admin_routes_test.go:102
Function
TestParsePagination_CustomValues
TestParsePagination_CustomValues 测试自定义分页参数
internal/adapter/handler/admin_routes_test.go:34
Function
TestParsePagination_Defaults
--- admin_routes 测试 --- RegisterAdminRoutes 需要完整的依赖 (Config, Container, DB), 属于集成测试范畴。此处仅验证辅助函数的正确性。 TestParsePagination_Defaults 测试默认分页参数
internal/adapter/handler/admin_routes_test.go:17
Function
TestParsePagination_InvalidValues
TestParsePagination_InvalidValues 测试无效分页参数 (回退默认)
internal/adapter/handler/admin_routes_test.go:51
Function
TestParsePagination_SizeTooLarge
TestParsePagination_SizeTooLarge 测试 size 超过最大值 (回退默认)
internal/adapter/handler/admin_routes_test.go:68
Function
TestParsePagination_ZeroPage
TestParsePagination_ZeroPage 测试 page=0 (回退默认)
internal/adapter/handler/admin_routes_test.go:85
Function
TestParseToken_Claims字段完整性
(t *testing.T)
internal/adapter/middleware/jwt_test.go:98
Function
TestParseToken_使用错误密钥解析失败
(t *testing.T)
internal/adapter/middleware/jwt_test.go:54
Function
TestParseToken_无效Token格式
(t *testing.T)
internal/adapter/middleware/jwt_test.go:83
Function
TestParseToken_过期Token解析失败
(t *testing.T)
internal/adapter/middleware/jwt_test.go:63
Function
TestProcessBlockData_失败交易跳过
TestProcessBlockData_失败交易跳过 验证失败的交易不被处理
internal/infrastructure/tron/monitor_test.go:251
Function
TestProcessBlockData_混合交易类型
TestProcessBlockData_混合交易类型 验证区块内包含多种交易类型的处理
internal/infrastructure/tron/monitor_test.go:590
Function
TestProcessBlockData_空区块
TestProcessBlockData_空区块 验证空区块返回 0 充值
internal/infrastructure/tron/monitor_test.go:215
Function
TestProcessBlockData_非监控地址跳过
TestProcessBlockData_非监控地址跳过 验证转入非监控地址的交易不被处理
internal/infrastructure/tron/monitor_test.go:280
Function
TestProcessTRC20FromData_收款地址不在监控列表
TestProcessTRC20FromData_收款地址不在监控列表 验证收款地址非监控地址时跳过
internal/infrastructure/tron/monitor_test.go:395
Function
TestProcessTRC20FromData_数据长度不足跳过
TestProcessTRC20FromData_数据长度不足跳过 验证 data 长度不足 136 字符时被跳过
internal/infrastructure/tron/monitor_test.go:339
Function
TestProcessTRC20FromData_解析地址和金额
TestProcessTRC20FromData_解析地址和金额 验证 TRC20 transfer data 解析的地址和金额正确性
internal/infrastructure/tron/monitor_test.go:367
Function
TestProcessTRC20FromData_金额为零跳过
TestProcessTRC20FromData_金额为零跳过 验证金额为零时跳过
internal/infrastructure/tron/monitor_test.go:421
Function
TestProcessTRC20FromData_非USDT合约跳过
TestProcessTRC20FromData_非USDT合约跳过 验证非 USDT 合约的 TRC20 交易被跳过
internal/infrastructure/tron/monitor_test.go:307
Function
TestProcessTRC20FromData_非transfer方法跳过
TestProcessTRC20FromData_非transfer方法跳过 验证非 transfer 方法的合约调用被跳过
internal/infrastructure/tron/monitor_test.go:323
Function
TestProcessTRXFromData_地址不在监控列表
TestProcessTRXFromData_地址不在监控列表 验证非监控地址被正确跳过
internal/infrastructure/tron/monitor_test.go:479
Function
TestProcessTRXFromData_金额验证
TestProcessTRXFromData_金额验证 验证 TRX 充值的金额边界处理
internal/infrastructure/tron/monitor_test.go:448
Function
TestProfileService_GetBills_ALL币种不筛选
(t *testing.T)
internal/domain/service/profile_service_test.go:134
Function
TestProfileService_GetBills_分页计算
(t *testing.T)
internal/domain/service/profile_service_test.go:148
Function
TestProfileService_GetBills_带币种筛选
(t *testing.T)
internal/domain/service/profile_service_test.go:117
Function
TestProfileService_GetBills_成功
==================== GetBills 测试 ====================
internal/domain/service/profile_service_test.go:96
Function
TestProfileService_GetBills_查询失败
(t *testing.T)
internal/domain/service/profile_service_test.go:186
Function
TestProfileService_GetProfileInfo_成功
==================== GetProfileInfo 测试 ====================
internal/domain/service/profile_service_test.go:30
Function
TestProfileService_GetProfileInfo_查询用户失败
(t *testing.T)
internal/domain/service/profile_service_test.go:66
Function
TestProfileService_GetProfileInfo_查询钱包失败
(t *testing.T)
internal/domain/service/profile_service_test.go:79
Function
TestProfileService_GetProfileInfo_用户不存在
(t *testing.T)
internal/domain/service/profile_service_test.go:53
Function
TestProfileService_GetSmallFreeInfo_无配置返回默认值
(t *testing.T)
internal/domain/service/profile_service_test.go:267
Function
TestProfileService_GetSmallFreeInfo_有配置
==================== GetSmallFreeInfo 测试 ====================
internal/domain/service/profile_service_test.go:248
Function
TestProfileService_GetSmallFreeInfo_查询失败
(t *testing.T)
internal/domain/service/profile_service_test.go:281
Function
TestProfileService_GetWithdrawalHistory_分页修正
(t *testing.T)
internal/domain/service/profile_service_test.go:220
Function
TestProfileService_GetWithdrawalHistory_成功
==================== GetWithdrawalHistory 测试 ====================
internal/domain/service/profile_service_test.go:201
Function
TestProfileService_GetWithdrawalHistory_查询失败
(t *testing.T)
internal/domain/service/profile_service_test.go:233
Function
TestProfileService_UpdateSmallFreeLimit_不支持的币种
(t *testing.T)
internal/domain/service/profile_service_test.go:344
Function
TestProfileService_UpdateSmallFreeLimit_更新TRX
(t *testing.T)
internal/domain/service/profile_service_test.go:315
Function
TestProfileService_UpdateSmallFreeLimit_更新USDT
==================== UpdateSmallFreeLimit 测试 ====================
internal/domain/service/profile_service_test.go:296
Function
TestProfileService_UpdateSmallFreeLimit_查询配置失败
(t *testing.T)
internal/domain/service/profile_service_test.go:372
Function
TestProfileService_UpdateSmallFreeLimit_设置为零_关闭免密
(t *testing.T)
internal/domain/service/profile_service_test.go:384
Function
TestProfileService_UpdateSmallFreeLimit_负数金额
(t *testing.T)
internal/domain/service/profile_service_test.go:334
Function
TestProfileService_UpdateSmallFreeLimit_配置不存在_创建新配置
(t *testing.T)
internal/domain/service/profile_service_test.go:357
Function
TestProfileUseCase_GetBills_成功
==================== GetBills 测试 ====================
internal/app/profile_usecase_test.go:67
Function
TestProfileUseCase_GetBills_查询失败
(t *testing.T)
internal/app/profile_usecase_test.go:82
Function
TestProfileUseCase_GetProfileDashboard_成功
==================== GetProfileDashboard 测试 ====================
internal/app/profile_usecase_test.go:36
Function
TestProfileUseCase_GetProfileDashboard_查询失败
(t *testing.T)
internal/app/profile_usecase_test.go:53
Function
TestProfileUseCase_GetSmallFreeInfo_成功
==================== GetSmallFreeInfo 测试 ====================
internal/app/profile_usecase_test.go:113
Function
TestProfileUseCase_GetWithdrawalHistory_成功
==================== GetWithdrawalHistory 测试 ====================
internal/app/profile_usecase_test.go:96
Function
TestProfileUseCase_UpdateSmallFreeLimit_失败
(t *testing.T)
internal/app/profile_usecase_test.go:148
Function
TestProfileUseCase_UpdateSmallFreeLimit_成功
==================== UpdateSmallFreeLimit 测试 ====================
internal/app/profile_usecase_test.go:132
Function
TestRedPacketClaim_TableName
(t *testing.T)
internal/domain/entity/entity_test.go:703
Function
TestRedPacketCover_TableName
(t *testing.T)
internal/domain/entity/entity_test.go:710
Function
TestRedPacketHandler_Detail_ClaimsError
TestRedPacketHandler_Detail_ClaimsError 测试查询领取记录出错
internal/adapter/handler/admin_redpacket_test.go:153
Function
TestRedPacketHandler_Detail_InvalidID
TestRedPacketHandler_Detail_InvalidID 测试无效红包 ID
internal/adapter/handler/admin_redpacket_test.go:96
Function
TestRedPacketHandler_Detail_NotFound
TestRedPacketHandler_Detail_NotFound 测试红包不存在
internal/adapter/handler/admin_redpacket_test.go:115
Function
TestRedPacketHandler_Detail_RepoError
TestRedPacketHandler_Detail_RepoError 测试查询红包出错
internal/adapter/handler/admin_redpacket_test.go:134
Function
TestRedPacketHandler_Detail_Success
TestRedPacketHandler_Detail_Success 测试获取红包详情成功
internal/adapter/handler/admin_redpacket_test.go:34
Function
TestRedPacketHandler_New
--- AdminRedPacketHandler 测试 --- 注意: List 和 Stats 方法内部使用 h.db 直接查询,需要真实 DB 才能测试。 此处仅测试 Detail 方法 (通过 repo) 和构造函数。 TestRedPacketHandler_New 测试构造函数
internal/adapter/handler/admin_redpacket_test.go:22
Function
TestRedPacketService_AddCover_创建失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:673
Function
TestRedPacketService_AddCover_成功
==================== AddCover 测试 ====================
internal/domain/service/redpacket_service_test.go:653
Function
TestRedPacketService_ClaimRedPacket_Redis加锁失败
==================== ClaimRedPacket 领取前校验测试 ====================
internal/domain/service/redpacket_service_test.go:686
Function
TestRedPacketService_ClaimRedPacket_已领取过
(t *testing.T)
internal/domain/service/redpacket_service_test.go:822
Function
TestRedPacketService_ClaimRedPacket_查询领取记录失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:848
Function
TestRedPacketService_ClaimRedPacket_红包不存在
(t *testing.T)
internal/domain/service/redpacket_service_test.go:712
Function
TestRedPacketService_ClaimRedPacket_红包已过期
(t *testing.T)
internal/domain/service/redpacket_service_test.go:777
← previous
next →
1,701–1,800 of 2,200, ranked by callers