!3 !c This tutorial describes the ColumnFixture element of the [[FIT][http://fit.c2.com]] framework.  It is composed of the following sections:
|!-fit.Fixture-!|
|ColumnFixture|''This page.  Describes the basic functions of the fixture''|
|ColumnFixtureDesign|''Describes tips and philosophy of designing ColumnFixture tests.''|
----
!2 !c Basic Functionality of ColumnFixture
A column fixture is about a simple as a test fixture can be.  It is the equivalent of calling a function in a programming language.  The table specifies the input arguments to the function, and the return values from the function.

Here's a simple example (see it work by hitting the '''Test''' button or typing ''ALT-t''.):

|eg.Division|
|numerator|denominator|quotient()|
|100|4|25|
|100|4|26|

The Division fixture is written like this:{{{
package eg;

// Copyright (c) 2002 Cunningham & Cunningham, Inc.
// Released under the terms of the GNU General Public License version 2 or later.

import fit.ColumnFixture;

public class Division extends ColumnFixture {
    public float numerator;
    public float denominator;
    public float quotient() {
        return numerator / denominator;
    }
}
}}}It should be obvious how this works.  The header row of the table names the variables and methods of the eg.Division class.  For each row of the table, the variables of the class are loaded, and then the functions are called.  It's as simple as that.  If the return value of the function matches the corresponding table cell, then the cell is turned green.  Otherwise it it turned red, and the expected and actual values are shown.

!img http://files/images/runArrow.gif For more on ColumnFixture see: ColumnFixtureDesign.
