Ran the ATM stepdefs for the 1st time.
Made initial balance step green.
Made "deposit/withdraw/recharge electricity" step green.
Refactored the stepdefs file.
Made the "amount" step green.
Combined 2 steps into 1.
Made the first scenario passed.
Made all tests green.
Added AtmFacade class.
Delegated business logic to AtmFacade object.
Delegated business logic to MenuItem, Account and ElectricityCard objects.
Removed old code before delegating to the MenuItem, Account and Electricity objects.
Assumed that team A is developing a toolkit including MenuItem, team B is developing the application including all business logic objects. Team A doesn't know how the toolkit will be used. That's the point why we refactor the code to Command Pattern.
The Team A developing the toolkit only knows that the client of the MenuItem object would invoke clicked method of MenuItem object.
Refactored to Command Pattern. Started from calling clicked() method in the invoker (concrete MenuItem objects) in the AtmFacade object. And configured a specific concrete command for each invoker in the AtmFacade object.
Removed the old code before refactoring to Command pattern.
Merge branch 'master' of https://github.com/wubin28/KataATM