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

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Core API
>Group: Release 2.1
Status: Open
>Priority: 3
Private: No
Submitted By: Garrett Smith (garrett1020)
>Assigned to: Jevon Wright (jevonwright)
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-03 02: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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to