Head First Design Patterns by Eric Freeman

Head First Design Patterns by Eric Freeman

Author:Eric Freeman
Language: eng
Format: epub
Publisher: O'Reilly Media


Testing our code

It’s time to put everything to a test. Let’s write some test drive code and see how the Waitress works...

Here’s the test run...

What have we done so far?

For starters, we’ve made our Objectville cooks very happy. They settled their differences and kept their own implementations. Once we gave them a PancakeHouseMenuIterator and a DinerMenuIterator, all they had to do was add a createIterator() method and they were finished.

We’ve also helped ourselves in the process. The Waitress will be much easier to maintain and extend down the road. Let’s go through exactly what we did and think about the consequences:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.