FitNesse. UserGuide. FitLibraryUserGuide.
TaggedStrings [add child]
TaggedStrings allow you retain tags (HTML or XML) in Fit table cells.

For example, in the following tests, the tags are included in the comparison between the expected and actual values:

fitlibrary.specify.DoWithTags

check tag text bold bold

check tag text
one
one

check tag text
  • one
  • two
  • one
  • two

These fail because the tags differ:

check tag text bold bold
check tag text bold bold

In order for the tags to be retained, the underlying type needs to be a TaggedString, as shown in the following fixture class:

public class DoWithTags extends DoFixture {
public TaggedString tagText(TaggedString s) {
return s;
}
}


Because the argument to the method tagText() is a TaggedString, the FitLibrary fixtures retain the tags in the string. The same applies to the return type of the method.