Section 28.4. Expected Errors with DoFixture


28.4. Expected Errors with DoFixture

Consider now the test from Section 10.2 on p. 74, shown again in Figure 28.4. The second row of the fourth table tests that the action to remove a room is rejected.

Figure 28.4. TestCloseRoomFails


The reject special action calls the method removeRoom() in the system under test. The method removeRoom() returns false in this case, as it's not possible to remove a room if users are in it. Hence, the reject succeeds.



    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