是“记录”吗?在 Rhino Mocks 中已弃用
最新版本的Rhino模拟支持Arrange、Act Assert方法。这是否意味着以前版本中使用的记录方法已被弃用?
我认为它是(已弃用),但当我阅读“单元测试的艺术”时,他在介绍 Rhino Mocks 时使用了 Record 方法。所以现在我不太确定......
有人确切知道吗?
更新:好吧,在我对他的做事方式感到不安之前,我需要阅读整章。在第 5.8 节中,他介绍了 AAA 语法。不过,我的问题仍然存在,现在更喜欢哪个:AAA 还是唱片?
The latest version of Rhino mocks supports Arrange, Act Assert methodology. Does that mean that the record method that it used in previous version is deprecated?
I thought it was (deprecated), but as I was reading "The Art of Unit Testing" he uses the Record method when he introduces Rhino Mocks. So now I am not so sure....
Any one know for sure?
UPDATE: OK, I need to read the whole chapter before I get all upset about how he is doing things. In section 5.8 he covers AAA syntax. Still, my question remains, which is preferred now: AAA or record?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您使用 AAA 语法时,您不使用 Record。您能粘贴“单元测试的艺术”的链接吗?引入 AAA 语法后,很多文档尚未更新。
编辑:我更喜欢 AAA 语法,因为它读起来更好。对参数设置一些约束似乎也更容易(尤其是 Arg<...>.Match),您不必记住运行 ReplayAll 等。
You don't use Record when you are using AAA syntax. Could you paste the link to "The Art of Unit Testing"? A lot of the documentation hasn't been updated after introduction of AAA syntax.
EDIT: I prefer the AAA syntax, because it reads better. It seems also easier to set some constraints on arguments (especially the Arg<...>.Match), you don't have to remember about running ReplayAll, etc.