tag:blogger.com,1999:blog-3237724005744642470.post15559645044515851..comments2014-09-05T21:54:37.641+01:00Comments on Captain Debug's Blog: Are you a Mockist or a Classicist?Roger Hugheshttp://www.blogger.com/profile/07042290171112551665[email protected]Blogger4125tag:blogger.com,1999:blog-3237724005744642470.post-38458875852191590922013-03-15T08:43:46.400Z2013-03-15T08:43:46.400ZLogisiker, thank you for your comment. I agree tha...Logisiker, thank you for your comment. I agree that the term 'mini-integration test' isn't a particularly good one. I used it to try to differentiate between integration testing small sets of classes, which would, for example be part of the bottom up approach described by Wikipedia, and end to end integration tests. The term 'integration test' so vague that it has been applied almost any test where more than one class is involved. I often think that we should come up with a set of names that accurately describe the differences between the different types of integration tests, at least that way I wouldn't feel then need to make one up.Roger Hugheshttp://www.blogger.com/profile/07042290171112551665[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-19921385747129744452013-03-13T14:11:52.480Z2013-03-13T14:11:52.480ZWhy the mini- prefix before integration tests? Ju...Why the mini- prefix before integration tests? Just admit that you writing and performing a full fledged integration test and not a unit test. You cannot call it a unit test if it does not remain in isolation and calling a unit test a mini-integration test is like calling an apple an orange. The defition of both levels of testing says it all:<br /><br />http://en.wikipedia.org/wiki/Unit_testing<br /><br />http://en.wikipedia.org/wiki/Integration_testinglogistikerhttp://www.blogger.com/profile/14908591584319462666[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-49062445652636658222011-10-29T21:22:13.111+01:002011-10-29T21:22:13.111+01:00There is a difference between Mock objects and Stu...There is a difference between Mock objects and Stub objects, which personally comes down to implementation semantics.<br /><br />A Mockist would inject a Mock object and a Classicist would use a stub. <br /><br />A mock object is an object in which you can define a path through your code and verify that the path has been followed, i.e. you set expectations and verify that they have occurred.<br /><br />A stub, on the other hand, is a dummy object, which when accessed will return dummy values to your code. You cannot verify that a stub object has been called, just that your code under test return the correct result.<br /><br />So, you have the choice of which type of fake implementation you inject.RogHughehttp://www.blogger.com/profile/01156618138910041214[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-90746150091423630802011-08-29T12:23:45.383+01:002011-08-29T12:23:45.383+01:00Could you please explain how not to be a mockist w...Could you please explain how not to be a mockist where the test subject depends on any other object?<br /><br />How can I test an object without mocking its dependencies: e.g. if there is a service you are testing, you either have to insert a working DAO ot a mock DAO but if you are a classiscist, and only "check the state of your test object", you will get NPEs because the calls the service makes do not bear any results.Anonymous[email protected]