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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

testing a user story’s functionality<br />

Title:<br />

282 Chapter 8<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 />

Task 1<br />

20 6<br />

Priority: Estimate:<br />

import org.junit.*;<br />

Capture order info,<br />

gift card info, and<br />

receipt info.<br />

public class TestOrderInformation {<br />

@Test<br />

}<br />

}<br />

Below is the task we’re working on and the user story it came from. Your job is to add the next<br />

test to the TestOrderInformation class to make progress on this task.<br />

public void testCreateOrderInformationInstance() {<br />

OrderInformation orderInfo = new OrderInformation();<br />

}<br />

@Test<br />

public void testOrderInformation() {<br />

5<br />

Download at WoweBook.Com<br />

You should always look to the<br />

story to figure out what you<br />

should be testing at a higher,<br />

functional level.<br />

For this test you should be focusing on<br />

the OrderInformation class. We’ll get to<br />

the gift card and receipt later.<br />

* If you’re not a Java<br />

programmer, try and write out<br />

the test in the framework you’re<br />

using, or type it into your IDE.

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

Saved successfully!

Ooh no, something went wrong!