Keep ActionFixture in mind

DoFixture does not currently support checking for a detailed exception type or error message. If you want this, use ActionFixture instead. ActionFixture was originally intended for tests that do not have a repetitive structure, and it is a part of the basic FIT library. It uses a GUI metaphor with actions to Enter (set value), Press (call method) and Check (read value). Some developers like it because it is straightforward and does not require writing cumbersome method names like PlayerEntersAndIntoAndToRegister. DoFixture makes tests much more readable and compact than ActionFixture, and also has some nice test flow-control features (discussed in Chapter 8, Coordinating fixtures), so generally you should use DoFixture instead of ActionFixture if you can. However, there are a few cases where you might want to use ActionFixture instead. For example, with ActionFixture, you can check for detailed exception types and error messages (see Checking for errors). DoFixture does not support this yet.

To use ActionFixture, you should not inherit this class directly, but extend fit.Fixture. Put your class name after the keyword start, and then use enter, press and check to define the test. Here is a simple example of a class automated using ActionFixture:

class TestConcatenation:fit.Fixture{ 
  public string FirstString; 
  public string SecondString;
  public string Concatenate(){
    return FirstString+SecondString; 
  } 
  public void Clear(){ 
    FirstString=""; 
  } 
}

Here is the test code:

!|ActionFixture| 
|start|TestConcatenation|
|enter|first string|Hel| 
|enter|second string|lo| 
|check|concatenate|Hello|
|press|clear| 
|check|first string|blank|