3,007 reputation
822
bio website undisclosed-recipients.blogsp…
location San Diego, CA
age 53
visits member for 4 years, 5 months
seen Apr 15 at 14:06
Scientific Visualization
Agile
Java
TDD

Apr
15
revised TDD Red-Green-Refactor and if/how to test methods that become private
its --> it's and introduced semicolons between independent clauses
Feb
5
comment How do you write tests for methods that interact with data in system files?
Could you parameterize [NSUserDefaults standardUserDefaults]? Make it something that can be set by the test, so what you're actually writing to, while testing, is some kind of mock?
Feb
4
awarded  Enlightened
Jan
29
awarded  Nice Answer
Jan
29
comment How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
At present you have a requirement that the email service is called, and your test verifies this requirement is satisfied. When you change the requirement so that a communication service, rather than an email service, must be called, then you need to update the test to reflect that.
Jan
29
comment How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
If you have mocked the email service, you should be testing your coordinator's collaboration with that service. So it is enough to know that your coordinator has requested that the email service send the desired messages. The mock email service will not actually send an email; that's not something you want to test as part of the coordinator's unit test.
Jan
29
answered How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
Jan
26
comment Test driven development workflow for two programmers
In your pair programming, you may want to experiment with the ping pong pattern; it is similar in some ways to what you initially asked about.
Jan
26
revised Test driven development workflow for two programmers
typos
Dec
29
revised TDD with repository pattern
it's --> its
Nov
21
awarded  Yearling
Nov
5
answered More appropriate to validate a dependency filter parameter by mock+stub or by expression compile?
Sep
12
answered What can be done when you are the only person to care about consistency?
Aug
15
awarded  Enlightened
Aug
15
awarded  Nice Answer
Aug
15
comment Drawback of using static method
True, but on the other hand a static random number method - which you would at first thing also would be fine as a static - is a pain when you want deterministic testing. Static methods certainly have their place, but the OP was looking for reasons one might not want them.
Aug
15
answered Drawback of using static method
Aug
15
answered Testing that an attribute does not exist cannot fail when writing tests before code
Jun
25
comment Is template “metaprogramming” in Java a good idea?
Also, even if it turns out that the performance issues are real, the exercise of having studied them will help you to better know what is possible with your code.
May
7
answered Help in ensuring unit tests are meaningful