Feature Requests item #1114707, was opened at 2005-02-02 06:59
Message generated for change (Comment added) made by garrett1020
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=1114707&group_id=61302

Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Garrett Smith (garrett1020)
Assigned to: Nobody/Anonymous (nobody)
Summary: Regular expressions in table assertions

Initial Comment:
There are cases where I don't know exactly what a table
cell will contain. E.g. a date/time stamp, a randomly
assigned ID, etc. It would be very useful to have
regular expression support in the table assertions.

There are a couple other feature requests dealing with
table assertions that I believe could be accommodated
with regex: the 'startswith' assertion request and the
'assert rows' request. Startswith is easy enough to
implement using regex and one could assert a number of
rows (e.g. 2 rows and 2 cells) using something like:

   assertTableEquals("foo", new String[][] 
      { ".*", ".*"},
      {".*", ".*"});

As far as the interface, you could add another
signature of each of the assertTableXXX methods that
takes a boolean flag useRegex, e.g. Or add methods such
as assertTableEqualsExpr(...).

As a much simpler implementation, you could forget
regular expression support and just accept nulls for
table cell values, which would indicate the user
doesn't care what value exists. This would satisfy the
date/time and random ID issue, but wouldn't help the
guy who wanted 'startswith'.

Just some thoughts.

----------------------------------------------------------------------

>Comment By: Garrett Smith (garrett1020)
Date: 2005-02-02 07:00

Message:
Logged In: YES 
user_id=448609

Oops..I just spotted the other regex feature request. Oh
well :-/

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=1114707&group_id=61302


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to