Write an executable test for this story, and include the class and method declarations as illustrated in this chapter. Include at least one test case in each method, but don't worry about completeness. The point is the organization, not the details.
A1:
The class name is IterationStoryTest, and it has two methods: testDisplay() and testUpdate():
public class IterationStoryTest { public void testDisplay() { login("bob","bobspassword") assertTrue( displayIteration( "1") ); assertFalse( displayIteration( "-1") ); } public void testUpdate() { login("bob","bobspassword"); assertTrue( UpdateIteration( "10", "20041201", "20041215") ); assertFalse( UpdateIteration( "non-numeric", "bad date", "bad date" ) ); } }
Q2:
Pretend your customer can't stand the executable format. Create or mock up a spreadsheet for him that corresponds to the executable test in question 1.
A1:
The spreadsheet would be IterationTestStory.xls, and it would have two workbooks: