Questions Answers


Questions & Answers

Q1:

So, presumably, the second table of Figure 28.5 couldn't be split?

A1:

That's right. If the second action were in a row by itself, it wouldn't work, because it would then be applied to the flow fixture object. If we added a first row to that new table to connect anna, it would fail because anna would already be connected.

Q2:

Are there any disadvantages in not having simple adapter methods in a DoFixture?

A2:

Yes. If a programmer renames a method in an application class that is accessed directly from a Fit table action, the Fit test will be broken. The programmer may not realize this until the Fit tests are run but can then simply add an adapter method to map from the name in the Fit table action to the name of the method in the application class.

When looking at a DoFixture class, it's not obvious which actions it really supports; it is necessary to look at the Fit tables and/or the associated system under test. The latter is similar to the need to look at its superclasses to understand the behavior of a class.



    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