Section 31.2. Developing the Fixture


31.2. Developing the Fixture

Later in the afternoon, we got together with Emily to discuss the fixture class. She mentioned in passing, "That other table dropped out easily; no trouble. Don is entering the tests now for those tables."

Emily had got the bare bones of the fixture class together, as shown in Listing 31.1.[1] However, she was unsure of the best way to hook it up to the application.

[1] See Chapter 21 for an introduction to writing ColumnFixture classes.

Listing 31.1. TestLate.java (version 1)
 public class TestLate extends fit.ColumnFixture {    public float hoursLate, grace, highDemand;    public boolean countGrace;    public int extraHours() {       return 0;    } } 

After suggesting to Emily that she change the return value of exTRaHours() to -1, she ran Fit on it. Of course, none of the tests passed.



    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