Our customer discovered the need to insert a return inside a < pre > tag. Implementing this turns out to be fairly simple, but we learn some lessons about how to test and build even a simple feature.
When we built the <pre> tag, the customer discovered there was no way to type in multiple lines of code, which is kind of the point of the tag, so they ve asked us for a way to do that. We suggested, and they agreed, or maybe it was the other way around, that the standard way in Microsoft Windows to enter a return without any special action is to type Shift+Enter. That s what we ll do. The basic plan will be to write a programmer test, make it work, and then write a customer test and show that it works.
You may be wondering why we would do both, especially since today I m all the programmers, and all the customers, rolled into one. To me, the customer test is of paramount importance, because I m always concerned about keeping my customers happy. So I can t skip that one. In this case, the customer test will probably serve as a decent test for programming as well, but in general that s not so. I would usually recommend that the programmers write their own finer-grain tests as a matter of practice, and that s what I ll do.
Now, as well, I ve noticed that the customer tests don t provide much good information when they fail. We might want to address that later on, but for now, it s another reason why we should start with a programmer test.
First, however, we ll load up Microsoft Visual Studio, and we ll run all the tests to make sure that everything is in good order. It s been a while since any work was done on this project, and it s best to be careful. It only takes a moment...right. Everything works fine. Let s change that.