... No. That's why we have databases. ... Yes. ... Consider a store that provides percentage discounts. Suppose discounts expire by some date. To find them,...
... Let me see... ... quality ... I wrote this in an article that I hope STQe magazine will publish, although it will not have any code. It will describe why I...
... why ... a "spy" ... to ... listeners in ... What you describe above, I used to think that was a mock object. My definition was: anytime you have your...
... "Agile Software Development: Principles, Patterns, and Practices" by Robert C. Martin contains some related material that you may find helpful. The book...
I have a code TestCase here that I'm going to include and I'd like to ask this list two questions: 1) What "strategy" is being used here? Mock object, stub,...
... Like many other things... I am getting the impression that it is not that mocks are bad, but being so new, they get overused easily - just like exceptions...
... I am finding my thinking on building JDBC code moving all over the place. The biggest problem I see with the mock approach I think is that it ties your...
... Right. They're not bad. And their occurrence is often a signal that the code needs careful scrutiny. And often if we make a little effort to remove them,...
shailesh401 wrote: Google "Use your singletons wisely". I think if you just change this class to a toolbox, it'll be easier to test. If this is already a...
... I think it's a question of definition. We can easily play the semantics game and confuse one another, which is one reason I'd like to see us converge on...
... I call it a Spy. I think it is properly a Mock: it records information about what happened to review later. ... It appears that you want to verify this: *...
XPSD is meeting tomorrow night, Thursday October 2. If you are interested in refactoring or seeing refactoring techniques in use, please attend! This will...
... It's the Golden Hammer, pure and simple. -- J. B. Rainsberger, Diaspar Software Services http://www.diasparsoftware.com :: +1 416 791-8603 Let's write...
... I never realized you wrote that article! I implemented an enhanced version of your toolbox approach in our application, and it has been great in making it...
... Yes, but you know the database schema is changing, so you change your golden masters with it. It's not the best, but I think it's less costly than...
... Where possible, mocks fail /as soon as they detect an error/. That's where the Endo Testing term somes from. That's how you get the stack trace that shows...
... Do you guys consider the ability to validate itself and to detect the problem an absolute requirement when talking about Mock objects ? As a matter of...
... I'm a little confused by that. So you're saying that it records method call sequence? But I thought it does about the same thing you were describing with...
... Precisely why I wrote that post. ... Absolutely. ... The above logic doesn't seem to relate to the definitions you mention below. According to those ...
... A method invocation sequence of 1 is still a method invocation sequence. If we're trying to reach solid definitions, then we have to be precise. The only...
Everyone: I want to focus on this part of the recent conversation about the taxonomy of alternate implementations of interfaces. I would like to discuss...
Everyone: The recent talk of mock objects has inspired me to write two essays. I have uploaded the first "How to use Mock Objects" the file section of this...
... It may be that I'm just out of touch with the practices and terminology of the TDD community, but this "recording and verifying method invocation...
... To me, the important distinction is whether or not the mock/stub/fake/spy is ever used when the application is executing in production. If the object is ...
... I agree. It is possible that a method invocation sequence is the expectation, but not required. But it is the immediate declaration of a failure that is...
... Or is this why you don't consider it a Fake object? ... Ummm... I don't follow how what I did is different from what you described. All I did was record...