I think you well understood and clearly formulated the difference between testing and testing, and, as Bjorn points out, all test developments must be the first. To your question about how to switch from test to test-oriented thinking, I suggest several times to perform a relatively simple exercise (for example, implement Range or Rectangle), trying to come up with a different implementation each time. The first time you come up with what you are thinking now - and it is not caused by trials, as you indicate. Next time you will not be able to use what you are thinking now; you will have to turn to something else, and some of these achievements will occur if the test fails. Perhaps for the third time, you will begin to give up your preconceived decisions and just do what makes you make you - and you are on the way to thinking based on tests.
If the exercise is not to your taste, try writing your first test sooner. Do not analyze in advance. Just taking the problem upon yourself, first write a test. Now you can think of a problem with the “looking over your shoulder” test. It will be inconvenient for some time, but due to discomfort a new way (and, I think, good) should appear to look at the problems.
source share