Changing strings in suitability textbox before running tests using c #
Bring me guys, because I dont know how to get started with fitNesse framework.
here's where i need help, after running the test i want the suitability string or scripts to be placed in the suitability textbox and then a certain function will parse the scripts to replace the lines i want to replace. For example, I would like to replace all "today" text in scripts with the real DateTime today.
in fact my goal is to do this because not only used it in parsing "today's date", but instead included parsing tomorrow, yesterday, and "base" the variable at the top of each test case. Most of its use will be in assigning the "base" functionality.
Then I created a class called DateFunctions that parses the text in the text area, doesn't just look for the 'today' keyword, but also includes the parsing tomorrow, yesterday
My new question would be, could my new implementation below make sense or maybe correct? and is there a way to debug C # codes in fitness?
public class RowFixtureBase : fit.RowFixture
{
public virtual void setBaseDate(String basedate)
{
if (!DateFunctions.SetBaseDateTo(basedate))
{
throw new ArgumentException();
}
}
public override void DoRow(fit.Parse rows)
{
foreach (fit.Parse row in new fitlibrary.ParseEnumerator(rows))
{
fit.Parse newrow = new fit.Parse(DateFunctions.EvaluateDate(row.Text));
base.DoRow(newrow);
}
}
//more codes here that is irrelevant to the question
}
a source to share