Test List[1]

In Chapter 1, we stated that the first step is to brainstorm a list of tests for the task. The goal of this activity is to create a test list that verifies the detailed requirements and describes the completion criteria. One thing to keep in mind is that the list is not static. As you implement each test, you might have to revisit the list to add new tests or delete them as appropriate.

Let’s try to write the test list for the unbounded Stack.

Unbounded Stack Test List

  • Create a Stack and verify that IsEmpty is true.

  • Push a single object on the Stack and verify that IsEmpty is false.

  • Push a single object, Pop the object, and verify that IsEmpty is true.

  • Push a single object, remembering what it is; Pop the object, and verify that the two ...

Get Test-Driven Development in Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.