As I said, the code doesnt look done to us: we have a sense of duplication from that special case that inserts the paragraph tag and such. Wed like to consolidate the special case and the general case. Furthermore, now that were more familiar with ArrayList, we think we can probably do the editing right in the lines ArrayList and get rid of newlines altogether. Were going to leave that for another day, because...
Thats right. Our first story is now working. Remember, it was
When Im typing a paragraph inside P tags and I hit a return, create another P tag underneath this one and put the cursor in between the new tags, in the right typing location.
So, were finished and can move on to the next story, right?
We dont have a customer test for this story. Weve satisfied ourselves as programmers that it works, but how can we satisfy our customer? We owe our customer a customer test. In the next chapter, well show how we create a customer test for this, our very first story. No framework, no waiting for QA to show up; well just create a test we think our customer will be able to understand. Watch for it!