tag:blogger.com,1999:blog-1491832788620029067.post9127148062183575273..comments2024-03-25T02:15:57.630-07:00Comments on Sustainable Test-Driven Development: Testing the Chain of Responsibility, Part 2Scott Bainhttp://www.blogger.com/profile/05410128716057054818noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1491832788620029067.post-10850933330807870122013-06-30T09:26:48.897-07:002013-06-30T09:26:48.897-07:00It swallowed all my angle-bracket-enclosed type na...It swallowed all my angle-bracket-enclosed type names but I'm sure you get the gist.Max Guernsey, IIIhttps://www.blogger.com/profile/07378097426969863070noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-70804261083408679992013-06-30T09:25:46.485-07:002013-06-30T09:25:46.485-07:00I guess I would have gone a slightly different way...I guess I would have gone a slightly different way. I would have had a factory that was solely responsible for building the objects (you did that). Presumably, that factory would need to produce at least one terminal processor with nothing that it decorates. I would condition my mock factory to produce a mock processor for the terminal. For the next thing that should be built, I would Max Guernsey, IIIhttps://www.blogger.com/profile/07378097426969863070noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-11540323222939093382012-09-30T09:28:27.889-07:002012-09-30T09:28:27.889-07:00In the second example, my client had specified out...In the second example, my client had specified out the rules pretty clearly and the client specification even included a flow chart of the rules. The ordering of the rules certainly was important. However, the primary concern was the impact on the user scenarios. We had jointly developed the rules in close collaboration to achieve what we hoped was the ideal impact for the user. The rules Robert St. Pierrehttps://www.blogger.com/profile/05904868766502174348noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-87298150126870284992012-09-30T09:27:50.790-07:002012-09-30T09:27:50.790-07:00It is at this point where I feel TDD calls for an ...It is at this point where I feel TDD calls for an integration test and not a unit test. Up until now, the system was not constructed well enough to implement a specification test validating the client specification. Up until now, we were building the pieces. Now is the point where we can validate that the client specification is correct. At this point, I would implement a test which treats Robert St. Pierrehttps://www.blogger.com/profile/05904868766502174348noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-87310902377971938522012-09-30T09:27:11.637-07:002012-09-30T09:27:11.637-07:00The second smell is harder to describe. I'm h...The second smell is harder to describe. I'm hoping you can give it a good name, I'll name it "inappropriate or indirect coupling." The invalid input processor must come last. The reason it must come last is because it fails to validate its input. It is unlike the first two processors in that it processes all input. Its implementation of ShouldProcess is not like the others.Robert St. Pierrehttps://www.blogger.com/profile/05904868766502174348noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-28521723388460461052012-09-30T09:25:49.163-07:002012-09-30T09:25:49.163-07:00Thanks for writing this blog about TDD. I have fo...Thanks for writing this blog about TDD. I have found it entertaining and useful. It has opened my eyes to a new way of thinking about TDD. I have a new perspective and feel it will have a positive impact on my work. I had not thought of TDD tests as specification tests in the past. <br /><br />I do need to register some objections though. In particular, I think this blog entry has major Robert St. Pierrehttps://www.blogger.com/profile/05904868766502174348noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-85048904826091913292012-09-11T09:06:31.764-07:002012-09-11T09:06:31.764-07:00I look forward to seeing how the CoR was chosen, s...I look forward to seeing how the CoR was chosen, since this factory only exists in that context. Kenhttps://www.blogger.com/profile/08891390578699471167noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-23871218022655519952012-08-22T06:28:06.060-07:002012-08-22T06:28:06.060-07:00I'm going to defer to Amir on this one, since ...I'm going to defer to Amir on this one, since he is preparing the blog on auto-vs-manual mocks.<br />Scott Bainhttps://www.blogger.com/profile/05410128716057054818noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-64872700147160880302012-08-14T12:19:34.962-07:002012-08-14T12:19:34.962-07:00Hi, guys, just wanted to share a quick feedback. I...Hi, guys, just wanted to share a quick feedback. I tried two alternative ways that came to my mind and would like to share them along with some thoughts. I'd be very happy to hear your comments on pros, cons etc.<br /><br />First of all, seeing some custom code in the solution you provide, I thought it would be an interesting experiment to go the other way and actually use a mocking frameworkGrzegorz Gałęzowskihttps://www.blogger.com/profile/07005911345134430356noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-18544900856676787962012-08-09T16:15:27.723-07:002012-08-09T16:15:27.723-07:00We're preparing a future blog where we will sh...We're preparing a future blog where we will show the CoR being driven to by behavioral tests. However, please note that "behavior" is relative, as "client" is relative. To the part of the system that calls the factory to get the chain, the behavior is getting the correct chain. So, we are specifying the behavior at that level.Scott Bainhttps://www.blogger.com/profile/05410128716057054818noreply@blogger.comtag:blogger.com,1999:blog-1491832788620029067.post-46950926903689610342012-08-09T15:55:50.029-07:002012-08-09T15:55:50.029-07:00Testing for a particular implementation ties the t...Testing for a particular implementation ties the test to the implementation. Can you show the behavior-based tests? Those tests whould demonstrate how the tests suggested that the implementation be desiged using a chain of responsiblity.Kenhttps://www.blogger.com/profile/08891390578699471167noreply@blogger.com