FitNesse doesn't call setters in my fixture

Posted by Maurits Rijk on Stack Overflow See other posts from Stack Overflow or by Maurits Rijk
Published on 2010-04-29T21:24:53Z Indexed on 2010/04/29 21:27 UTC
Read the original article Hit count: 555

Filed under:
|

I have copied a trivial example from the FitNesse Two-Minute example:

package com.mrijk;

import fit.ColumnFixture;

public class Foobar extends ColumnFixture {
    private double numerator;
    private double denominator;

    public void setNumerator(double numerator) {this.numerator = numerator;}

    public void setDenominator(double denominator) {this.denominator = denominator;}

    public double quotient() {return numerator/denominator;}
}

However all test fail with: "Could not find field: denominator.", so obviously the setDenominator is not found/used. When I make the the variables numerator and denominator public instead of private, the tests run successfully.

I must be overlooking something, but can't see it yet. Anyone?

© Stack Overflow or respective owner

Related posts about fitnesse

Related posts about testing