开发者

Is "Record" Deprecated in Rhino Mocks

开发者 https://www.devze.com 2023-01-13 10:15 出处:网络
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?

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消