Extract the creation code into a factory method, override this factory method in a test subclass, and then make the overridden method return a mock object instead.
英
美
释义
将创建代码抽取到工厂方法,在测试子类中覆盖该工厂方法,然后使被覆盖的方法返回模仿对象。
把海词放在桌面上,查词最方便
触屏版
|
电脑版
©2003 - 2024 海词词典(Dict.cn)
立即下载