MCPcopy Create free account

hub / github.com/TGlimmer/TG_walletbot / functions

Functions2,200 in github.com/TGlimmer/TG_walletbot

FunctionTestRedPacketService_ClaimRedPacket_红包已领完
(t *testing.T)
internal/domain/service/redpacket_service_test.go:799
FunctionTestRedPacketService_ClaimRedPacket_红包查询失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:727
FunctionTestRedPacketService_ClaimRedPacket_红包状态不可领取
(t *testing.T)
internal/domain/service/redpacket_service_test.go:742
FunctionTestRedPacketService_ClaimRedPacket_获取锁失败_并发中
(t *testing.T)
internal/domain/service/redpacket_service_test.go:699
FunctionTestRedPacketService_CreateRedPacket_个数校验
(t *testing.T)
internal/domain/service/redpacket_service_test.go:94
FunctionTestRedPacketService_CreateRedPacket_均分红包参数校验通过边界
(t *testing.T)
internal/domain/service/redpacket_service_test.go:142
FunctionTestRedPacketService_CreateRedPacket_均分红包每份低于0点01
(t *testing.T)
internal/domain/service/redpacket_service_test.go:118
FunctionTestRedPacketService_CreateRedPacket_拼手气红包金额不足分配
(t *testing.T)
internal/domain/service/redpacket_service_test.go:130
FunctionTestRedPacketService_CreateRedPacket_金额小于等于0
==================== CreateRedPacket 参数校验测试 ====================
internal/domain/service/redpacket_service_test.go:72
FunctionTestRedPacketService_ExpireRedPackets_无过期红包
==================== ExpireRedPackets 测试 ====================
internal/domain/service/redpacket_service_test.go:874
FunctionTestRedPacketService_ExpireRedPackets_查询过期红包失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:886
FunctionTestRedPacketService_GetClaimsByPacketID_成功
==================== GetClaimsByPacketID 测试 ====================
internal/domain/service/redpacket_service_test.go:565
FunctionTestRedPacketService_GetClaimsByPacketID_查询失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:595
FunctionTestRedPacketService_GetClaimsByPacketID_空列表
(t *testing.T)
internal/domain/service/redpacket_service_test.go:583
FunctionTestRedPacketService_GetCoversByUserID_成功
==================== GetCoversByUserID 测试 ====================
internal/domain/service/redpacket_service_test.go:609
FunctionTestRedPacketService_GetCoversByUserID_查询失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:639
FunctionTestRedPacketService_GetCoversByUserID_空列表
(t *testing.T)
internal/domain/service/redpacket_service_test.go:627
FunctionTestRedPacketService_GetRedPacketByID_不存在
(t *testing.T)
internal/domain/service/redpacket_service_test.go:445
FunctionTestRedPacketService_GetRedPacketByID_成功
==================== GetRedPacketByID 测试 ====================
internal/domain/service/redpacket_service_test.go:432
FunctionTestRedPacketService_GetRedPacketByID_查询失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:457
FunctionTestRedPacketService_GetUserRedPackets_成功
==================== GetUserRedPackets 测试 ====================
internal/domain/service/redpacket_service_test.go:384
FunctionTestRedPacketService_GetUserRedPackets_查询失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:416
FunctionTestRedPacketService_GetUserRedPackets_空列表
(t *testing.T)
internal/domain/service/redpacket_service_test.go:403
FunctionTestRedPacketService_UpdateSentStatus_成功
==================== UpdateSentStatus 测试 ====================
internal/domain/service/redpacket_service_test.go:471
FunctionTestRedPacketService_UpdateSentStatus_更新失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:550
FunctionTestRedPacketService_UpdateSentStatus_查询失败
(t *testing.T)
internal/domain/service/redpacket_service_test.go:538
FunctionTestRedPacketService_UpdateSentStatus_状态不正确
(t *testing.T)
internal/domain/service/redpacket_service_test.go:506
FunctionTestRedPacketService_UpdateSentStatus_红包不存在
(t *testing.T)
internal/domain/service/redpacket_service_test.go:494
FunctionTestRedPacketService_calculateClaimAmount_均分类型
(t *testing.T)
internal/domain/service/redpacket_service_test.go:237
FunctionTestRedPacketService_calculateClaimAmount_均分类型_可整除
(t *testing.T)
internal/domain/service/redpacket_service_test.go:255
FunctionTestRedPacketService_calculateClaimAmount_拼手气类型_已领取部分
(t *testing.T)
internal/domain/service/redpacket_service_test.go:297
FunctionTestRedPacketService_calculateClaimAmount_拼手气类型范围合法
(t *testing.T)
internal/domain/service/redpacket_service_test.go:272
FunctionTestRedPacketService_calculateClaimAmount_最后一人拿全部
==================== calculateClaimAmount 测试 ====================
internal/domain/service/redpacket_service_test.go:220
FunctionTestRedPacketService_calculateClaimAmount_默认类型
(t *testing.T)
internal/domain/service/redpacket_service_test.go:320
FunctionTestRedPacketService_getExpireHours_查询失败使用默认值
(t *testing.T)
internal/domain/service/redpacket_service_test.go:184
FunctionTestRedPacketService_getExpireHours_正常配置
==================== getExpireHours 测试 ====================
internal/domain/service/redpacket_service_test.go:161
FunctionTestRedPacketService_getExpireHours_配置不存在使用默认值
(t *testing.T)
internal/domain/service/redpacket_service_test.go:173
FunctionTestRedPacketService_getExpireHours_非法数值使用默认值
(t *testing.T)
internal/domain/service/redpacket_service_test.go:195
FunctionTestRedPacketService_randomAmount_只有1分钱
(t *testing.T)
internal/domain/service/redpacket_service_test.go:352
FunctionTestRedPacketService_randomAmount_多次调用结果在范围内
(t *testing.T)
internal/domain/service/redpacket_service_test.go:362
FunctionTestRedPacketService_randomAmount_边界值_最小情况
==================== randomAmount 测试 ====================
internal/domain/service/redpacket_service_test.go:341
FunctionTestRedPacketStatusConstants
(t *testing.T)
internal/domain/entity/entity_test.go:831
FunctionTestRedPacketTypeConstants
(t *testing.T)
internal/domain/entity/entity_test.go:819
FunctionTestRedPacket_IsExpired
(t *testing.T)
internal/domain/entity/entity_test.go:717
FunctionTestRedPacket_IsFullyClaimed
(t *testing.T)
internal/domain/entity/entity_test.go:750
FunctionTestRedPacket_RemainingAmount
(t *testing.T)
internal/domain/entity/entity_test.go:775
FunctionTestRedPacket_TableName
============================================================================= RedPacket 实体测试 =========================================================
internal/domain/entity/entity_test.go:696
FunctionTestResponse_ContentType
---------- 响应 Content-Type 验证 ----------
pkg/response/response_test.go:284
FunctionTestResponse_JSONStructure
---------- Response 结构体 JSON 序列化验证 ----------
pkg/response/response_test.go:292
FunctionTestSaveLastProcessedBlock_保存成功
TestSaveLastProcessedBlock_保存成功 验证区块号正确保存到缓存
internal/infrastructure/tron/monitor_test.go:817
FunctionTestSaveLastProcessedBlock_往返一致
TestSaveLastProcessedBlock_往返一致 验证保存后读取的值一致
internal/infrastructure/tron/monitor_test.go:830
FunctionTestScanBlocksBatch_ctx取消中断
TestScanBlocksBatch_ctx取消中断 验证 context 取消时保存已处理进度
internal/infrastructure/tron/monitor_test.go:1252
FunctionTestScanBlocksBatch_正常批量扫描
TestScanBlocksBatch_正常批量扫描 验证批量模式正确处理区块
internal/infrastructure/tron/monitor_test.go:1188
FunctionTestScanBlocksBatch_空区块跳过
TestScanBlocksBatch_空区块跳过 验证批量结果中 nil 区块被跳过
internal/infrastructure/tron/monitor_test.go:1231
FunctionTestScanBlocksBatch_获取失败降级逐块
TestScanBlocksBatch_获取失败降级逐块 验证批量获取失败时降级为逐块模式
internal/infrastructure/tron/monitor_test.go:1210
FunctionTestScanBlocksSequential_ctx取消中断
TestScanBlocksSequential_ctx取消中断 验证 context 取消时停止扫描
internal/infrastructure/tron/monitor_test.go:1165
FunctionTestScanBlocksSequential_正常逐块扫描
TestScanBlocksSequential_正常逐块扫描 验证逐块扫描正确处理区块
internal/infrastructure/tron/monitor_test.go:1123
FunctionTestScanBlocksSequential_获取区块失败停止
TestScanBlocksSequential_获取区块失败停止 验证获取某个区块失败时停止扫描
internal/infrastructure/tron/monitor_test.go:1145
FunctionTestScanNewBlocks_无新区块
--- scanNewBlocks / scanBlocksBatch / scanBlocksSequential 测试 --- TestScanNewBlocks_无新区块 验证当前区块号 <= 上次处理区块号时不扫描
internal/infrastructure/tron/monitor_test.go:1090
FunctionTestScanNewBlocks_获取当前区块失败
TestScanNewBlocks_获取当前区块失败 验证获取区块失败时不扫描
internal/infrastructure/tron/monitor_test.go:1107
FunctionTestScanNewBlocks_落后大量批量模式
TestScanNewBlocks_落后大量批量模式 验证落后 > batchThreshold 块时使用批量模式
internal/infrastructure/tron/monitor_test.go:1299
FunctionTestScanNewBlocks_落后少量逐块模式
TestScanNewBlocks_落后少量逐块模式 验证落后 <= batchThreshold 块时使用逐块扫描
internal/infrastructure/tron/monitor_test.go:1277
FunctionTestSendNotification_nil通知服务
TestSendNotification_nil通知服务 验证通知服务为 nil 时安全返回
internal/infrastructure/tron/monitor_test.go:1037
FunctionTestSendNotification_正常发送
--- sendNotification 测试 --- TestSendNotification_正常发送 验证通知正确发送
internal/infrastructure/tron/monitor_test.go:1005
FunctionTestSendNotification_用户不存在
TestSendNotification_用户不存在 验证用户查找失败时安全处理
internal/infrastructure/tron/monitor_test.go:1052
FunctionTestSendNotification_用户查询错误
TestSendNotification_用户查询错误 验证用户仓库返回错误时安全处理
internal/infrastructure/tron/monitor_test.go:1070
FunctionTestSendWithdrawal_TRX发送失败
TestSendWithdrawal_TRX发送失败 验证 TRX 发送失败时返回错误
internal/infrastructure/tron/sender_test.go:400
FunctionTestSendWithdrawal_TRX广播失败
TestSendWithdrawal_TRX广播失败 验证 TRX 广播不成功时返回错误
internal/infrastructure/tron/sender_test.go:441
FunctionTestSendWithdrawal_TRX自动发送成功
TestSendWithdrawal_TRX自动发送成功 验证 TRX 金额在阈值内的自动发送流程
internal/infrastructure/tron/sender_test.go:288
FunctionTestSendWithdrawal_USDT自动发送成功
TestSendWithdrawal_USDT自动发送成功 验证 USDT 金额在阈值内的自动发送流程
internal/infrastructure/tron/sender_test.go:343
FunctionTestSendWithdrawal_USDT金额无效
TestSendWithdrawal_USDT金额无效 验证 USDT 金额为零时返回错误
internal/infrastructure/tron/sender_test.go:494
FunctionTestSendWithdrawal_不支持的币种
TestSendWithdrawal_不支持的币种 验证非 TRX/USDT 币种返回错误
internal/infrastructure/tron/sender_test.go:235
FunctionTestSendWithdrawal_动态阈值
TestSendWithdrawal_动态阈值 验证阈值从 configRepo 动态读取
internal/infrastructure/tron/sender_test.go:203
FunctionTestSendWithdrawal_解密私钥失败
TestSendWithdrawal_解密私钥失败 验证解密失败时返回错误
internal/infrastructure/tron/sender_test.go:266
FunctionTestSendWithdrawal_超过阈值转人工
--- SendWithdrawal 测试 --- TestSendWithdrawal_超过阈值转人工 验证金额超过阈值时返回人工处理标记
internal/infrastructure/tron/sender_test.go:180
FunctionTestSignTransaction_异常场景
TestSignTransaction_异常场景 验证各种错误输入的处理
internal/infrastructure/tron/transaction_test.go:61
FunctionTestSignTransaction_正常签名
--- signTransaction 测试 --- TestSignTransaction_正常签名 验证对合法交易的签名流程
internal/infrastructure/tron/transaction_test.go:20
FunctionTestSignTransaction_确定性签名
TestSignTransaction_确定性签名 验证同一私钥和交易 ID 始终生成相同签名 (RFC 6979)
internal/infrastructure/tron/transaction_test.go:120
FunctionTestSubAccountStatusConstants
(t *testing.T)
internal/domain/entity/entity_test.go:1006
FunctionTestSubAccount_TableName
============================================================================= SubAccount 实体测试 ========================================================
internal/domain/entity/entity_test.go:999
FunctionTestSuccess
---------- Success 测试 ----------
pkg/response/response_test.go:38
FunctionTestSuccessWithPagination
---------- SuccessWithPagination 测试 ----------
pkg/response/response_test.go:100
FunctionTestSuccessWithPagination_EmptyList
(t *testing.T)
pkg/response/response_test.go:123
FunctionTestSuccess_NilData
(t *testing.T)
pkg/response/response_test.go:56
FunctionTestSuccess_SliceData
(t *testing.T)
pkg/response/response_test.go:68
FunctionTestSuperAdminOnly_Admin被拒绝
(t *testing.T)
internal/adapter/middleware/jwt_test.go:400
FunctionTestSuperAdminOnly_Editor被拒绝
(t *testing.T)
internal/adapter/middleware/jwt_test.go:417
FunctionTestSuperAdminOnly_SuperAdmin通过
(t *testing.T)
internal/adapter/middleware/jwt_test.go:388
FunctionTestSuperAdminOnly_Viewer被拒绝
(t *testing.T)
internal/adapter/middleware/jwt_test.go:429
FunctionTestSuperAdminOnly_无认证信息
(t *testing.T)
internal/adapter/middleware/jwt_test.go:441
FunctionTestSuperAdminOnly_表驱动测试
(t *testing.T)
internal/adapter/middleware/jwt_test.go:588
FunctionTestSupportedDirections_完整性
==================== SupportedDirections 测试 ====================
internal/app/exchange_usecase_test.go:179
FunctionTestSwitchInlineButton
TestSwitchInlineButton 测试创建选择聊天内联查询按钮
pkg/telegram/keyboard_test.go:43
FunctionTestSwitchInlineCurrentChatButton
TestSwitchInlineCurrentChatButton 测试创建当前聊天内联查询按钮
pkg/telegram/keyboard_test.go:28
FunctionTestSystemConfigKeyConstants
(t *testing.T)
internal/domain/entity/entity_test.go:1221
FunctionTestSystemConfig_TableName
============================================================================= SystemConfig 实体测试 ======================================================
internal/domain/entity/entity_test.go:1214
FunctionTestTransactionTypeConstants
(t *testing.T)
internal/domain/entity/entity_test.go:416
FunctionTestTransaction_IsIncome
(t *testing.T)
internal/domain/entity/entity_test.go:370
FunctionTestTransaction_TableName
============================================================================= Transaction 实体测试 =======================================================
internal/domain/entity/entity_test.go:363
FunctionTestTransferService_CreateReceiveRequest_不同币种
(t *testing.T)
internal/domain/service/transfer_service_test.go:75
← previousnext →1,801–1,900 of 2,200, ranked by callers