In our FitNesse tests, we use a ScriptTable to call an external tool, which imports some data to our database. The table looks like this:
!| script | Fixtures.MyClass |
| Update Dir | c:\FitNesse\XXXX\XXXXX |
| check | Message | |
UpdateDir is a function defined in our fixtures. It sets log-content to a variable called "Message". The content of Message looks like this:
Daten aus der Tabelle 'Table1' wurden gelöscht.Datei 'c:\FitNesse\XXX\File1.xml' konnte nicht importiert werden: ORA-00904: "ColX": ungültiger Bezeichner
Daten aus der Tabelle 'Table2' wurden gelöscht.Datei 'c:\FitNesse\XXX\File2.xml' wurde erfolgreich importiert.
With "check Message" the content of the variable is displayed at Runtime in the table, but not checked so far.
Now i want to extend the table with a row to check the content with a contain function.
If the variable "Message" does not contain the text "ORA-" Then Success Else Error
I tried to add the folllowing row to the ScriptTable:
| ensure | Message | should not contain | ORA- |
But now the table throws an error "ensure Method messageora not found in PassivPlusFixtures.MyClass" Can somebody help me to achive the desired behavior? Thank you so much in advance.