知识卡片
测试调度意图不必等待墙钟
把“何时提醒多少筹码”作为ScheduleAlertAt(duration,amount)接口,用Spy记录时长和数值,可立即检验时间表而不等数十分钟。该测试验证安排的参数,不证明真实Timer准时、回调输出成功或结束时已取消;运行时适配器需要另有验证。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
- · Time
原书出处 · 1 处
- Time · 查看原书依据
int } } func (s *SpyBlindAlerter) ScheduleAlertAt(duration time.Duration, amount int) { s.alerts = append(s.alerts, struct { scheduledAt time.Duratio
参考来源
- 位置:《通过测试学习 Go 编程》Time,spine027(book-sources;extracted/通过测试学习 Go 编程/_epub-src/OEBPS/Text/26.html)。
- 结论依据:原文SpyBlindAlerter记录alerts,表格比较时间和金额。
- 原始内容: int } } func (s *SpyBlindAlerter) ScheduleAlertAt(duration time.Duration, amount int) { s.alerts = append(s.alerts, struct { scheduledAt time.Duratio