知识卡片
边界翻译器需要共同测试
跨上下文翻译器是两支团队需要共同维护的接触点。原书案例中,预订侧的 Routing Service 将请求交给翻译器和网络遍历服务,再把结果转回预订模型;其对外接口隔离网络侧模型变化。
边界测试可输入 Route Specification,验证返回的 Itinerary 满足该规格。翻译规则细微、跨团队沟通较少,自动化测试能及早暴露契约漂移;但测试仍须以双方商定的语义为准。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第14章|Context Map · 查看原书依据
This is the one object that both teams have to work together to maintain. The design should make it very easy to unit-test, and it would be a particularly good idea for the teams to collaborate on a test suite for it. Other than that, they can go their separate ways.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第103章《Context Map》(源文件:_epub-src/0321125215_ch14lev1sec3.html;单元03–04)
- 结论依据:原文要求两队共同维护并测试翻译器,又建议对服务输入路线规格、检查返回行程。
- 原始内容:This is the one object that both teams have to work together to maintain. The design should make it very easy to unit-test, and it would be a particularly good idea for the teams to collaborate on a test suite for it. Other than that, they can go their separate ways.