fitnesse.slim.test.ZorkEditor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitnesse Show documentation
Show all versions of fitnesse Show documentation
The fully integrated standalone wiki, and acceptance testing framework.
package fitnesse.slim.test;
import java.beans.PropertyEditorSupport;
public class ZorkEditor extends PropertyEditorSupport {
@Override
public void setAsText(String text) throws IllegalArgumentException {
String[] tokens = text.split("_");
setValue(new Zork(Integer.parseInt(tokens[1])));
}
@Override
public String getAsText() {
Zork zork = (Zork)getValue();
return String.format("zork_%d", zork.getInt());
}
}