XNSIO
  About   Slides   Home  

 
Managed Chaos
Naresh Jain's Random Thoughts on Software Development and Adventure Sports
     
`
 
RSS Feed
Recent Thoughts
Tags
Recent Comments

FIT Decorators

Rick Mugridge has agreed to include the fit decorators I had written into the fit library. He plans to package them under fitlibrary.decorator.*

I have written an abstract class called FixtureDecorator. Anyone who wants to decorate any fit fixtures will have to extend the FixtureDecorator class and override the following 3 methods

protected void setupDecorator(Parse table) throws InvalidInputException;
If you need to pass any parameters to your decorator fixture, then write the logic in this method. Throws an InvalidInputException if your fixture expects some data, but in the fit test you have not set it.

protected void run(Fixture fixture, Parse table);
This is the main method which does the real decoration stuff and calls the super.run(fixture, table); when you want to execute the enclosed fixture.

protected void updateColumnsBasedOnResults(Parse table);
After execution, you might want to evaluate the results and mark the cells in your decorator as right or wrong. You can do that in this method.

Few things might change here and there, but this would be the essence of the fixture decorator.

This would be released under the GNU Public License. Oh yes! GPL.

Ideas/suggestions welcomed.


    Licensed under
Creative Commons License