Test 1 Create a Stack and verify that Is Empty is true

This test requires creating a Stack and then calling the IsEmpty property. The IsEmpty property should return true because we haven't put any elements into the Stack. Let's create a file called StackFixture.cs, in which we write a test fixture class, called StackFixture, to hold the tests. public clars StacaFixture There are a few things of Merest about this class. The line using NUnit.Framework is needed to reference the custom attributes defined in NUnit th at are uhed to mark the test...

Data Transfer Object

What should the DTO look like We have a requirement to be platform-independent. We also have the need to hide the actual data base schema from the cl i ents . Las tly, we have to add some calculated fields, totalRunTime and averageRevi that are not present in the database. Figure 6-1 de eicts the RecordingDto InFigure 6-1, there are only three complex types defined in the schema RecordingDto,TrackDto, and ReviewDto. When look at the database schema, you see seven tables Recording, Track,...

Test Case

Test case is a self-validating programmer test that can be automatically discovered and executed independently of other test cases by a test runner. Following are a few important points about test case Test case is a progtammertest. Although it is a pretty loose concept to pin down, the general rule of thumb is that the programm er test is a low-level test that aims to verify either method-level or class-level behavior. Test case is a self-validating test, which means that each programmer test...

Appendix A NUnit Primer

InChapter 1,Test-Driven Development Practices, we discussed the need for a framework to support the development, management, and execution of automated programmer tests. In this appendix, we introduce NUnit, which is a testing framework for all Microsoft .NET programming languages. Initially ported from JUnit, the current version 2.1.4 is written entirely in C and has been completely redesigned to take advantage of many .NET language features for example, custom attributes and other...