Note that there are some explanatory texts on larger screens.

plurals
  1. POModifying the strings in fitnesse textbox before running the tests using C#
    primarykey
    data
    text
    <p>Bear with me guys because I don't know how to start things up using fitNesse framework.</p> <p>okay here's where I need help, upon running the test I want to capture the string or the fitnesse scripts being placed in the fitnesse textarea and then a certain function will then parse the scripts to replace the strings I want to replace. For example, I'd like to replace all the 'today' text in the scipts with the real DateTime today.</p> <p>actually my purpose of doing this its because not only using it in parsing 'todays date' but instead including parsing tomorrow, yesterday and a 'basedate' variable at the top of each test. Much of its use will be on assigning the 'basedate' functionality.</p> <p>I then created a class named 'DateFunctions' which parses the text in the text area not just looking for the 'today' keyword but also including parsing tomorrow, yesterday </p> <p>my new question will be, is my new implementation below makes sense or is correct perhaps? and is there a way on how to debug C# codes in fitnesse?</p> <pre><code>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 } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload