01.02.2013 Views

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

When your tests pass, move on!<br />

The first task is complete and we have Receipt, GiftCard,<br />

and OrderInformation classes written and tested. Now it’s<br />

time to try our TDD approach on a tougher task: implementing<br />

the business logic to process and store orders.<br />

Different task, same process<br />

This task is no different than the last one. We’ll just follow the<br />

same approach. Write a test that fails, implement the code to get<br />

the test passing, perform any cleanup, and then repeat.<br />

1<br />

2<br />

3<br />

Title:<br />

Red: Your test fails.<br />

Preorder your c<strong>of</strong>fee<br />

with a gift card<br />

Select your c<strong>of</strong>fee preferences<br />

from the options, enter your gift card number,<br />

name, preferred store, and click submit to get a<br />

confirmation number, remaining balance, and<br />

estimated time when it will be ready for pickup.<br />

Description:<br />

Priority: Estimate:<br />

Task 2<br />

20 6<br />

Green: Your test passes.<br />

Implement business<br />

logic to process and<br />

store orders.<br />

Refactor: Clean up any duplication,<br />

ugliness, old code, etc.<br />

Download at WoweBook.Com<br />

2<br />

test-driven development<br />

you are here 4 289

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!