Section 10.2. Expected Errors with DoFixture


10.2. Expected Errors with DoFixture

With DoFixture, we can test directly whether an action has failed, as expected. For example, the tables reported in Figure 10.2 test that a room cannot be removed if somone is in it. In the fourth table, we check that the remove action does not succeed, by using the special action reject or, alternatively, not when it reads better, followed by the action concerned.

Figure 10.2. TestCloseRoomFails


Further capabilities of DoFixture are introduced in later chapters.

Programmers

The fixture code for the tests here is given in Section 28.2 on p. 231.




    Fit for Developing Software. Framework for Integrated Tests
    Fit for Developing Software: Framework for Integrated Tests
    ISBN: 0321269349
    EAN: 2147483647
    Year: 2005
    Pages: 331

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net