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.

2<br />

4<br />

Work up the first test for the very<br />

first piece <strong>of</strong> functionality you need<br />

to implement. You’re now Red.<br />

This test is going to fail.<br />

Everyone knows it. It’s OK.<br />

public void<br />

testGetOrderHistory2()<br />

public void<br />

testGetOrderHistory3()<br />

{<br />

{ // Test null username<br />

// } Test ““ username<br />

}<br />

public void<br />

testGetOrderHistory3()<br />

{<br />

// Test ““ username<br />

}<br />

Refactor any code you want cleaned up,<br />

then write the next test...Red again.<br />

Your first test should still be<br />

passing—but the new one will fail<br />

until you implement new supporting<br />

code.<br />

3<br />

public void<br />

testGetOrderHistory3()<br />

{<br />

// Test ““ username<br />

}<br />

public void GetOrderHistory3()<br />

{<br />

OrderHistory = new<br />

ORderHistory();<br />

System.out.println(“Hi<br />

mom!”);<br />

}<br />

Download at WoweBook.Com<br />

Write the simplest implementation<br />

code you can to get the test to pass.<br />

You’re now Green.<br />

test-driven development<br />

public void GetOrderHistory3()<br />

{<br />

OrderHistory = new<br />

OrderHistory();<br />

System.out.println(“Hi<br />

mom!”);<br />

}<br />

you are here 4 313

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

Saved successfully!

Ooh no, something went wrong!