Question

I'm trying to set a symbol in my CustomFixture class, but this is not working for some reason. I have another method in there which takes a single argument, and is then set to a symbol. This works fine. Whenever I try to set a symbol with a name and a value (so 2 parameters) it's not working. This is the Javacode:

public class CustomFixtures extends Fixture {

/**
 * Set a timestamp to a symbol
 * @param symbol name of the symbol
 */
public void setCurrentDateTime(String symbol){
    DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    FixtureBridge.setSymbol(symbol, dateFormat.format(new Date()));
}

public void setSymbolValue(String symbol, String value){
    Fixture.setSymbol(symbol, value);
}

}

Code called in test:

 |script|selenium driver fixture|
    |set symbol value|test|test|

This is the error that I get:

set symbol value Method setSymbolValueTest[1] not found in com.xebia.incubator.xebium.SeleniumDriverFixture.

Hope anyone has an idea, any help is appreciated! Thanks!

Was it helpful?

Solution

I figured it out, the type of Fixture class you extends corresponds to the format of how you have to call your fixture. I extended DoFixture. This causes me to put the table in this format:

|set symbol|symbol|with|value|

odd columns are concatenated in the method name. Even column names are the parameters:

public void setSymbolWith(String symbol, String value)

For further reference: http://fitnesse.org/FitNesse.UserGuide.FixtureGallery.FitLibraryFixtures.DoFixture

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top