Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Looking for Regex library to generate valid/invalid String

918829Feb 21 2012 — edited Feb 21 2012
Hi-

My project use MDA (domain object are specified from an XML file) and we generate the domain, transfer object, DAO, services and controllers, flex controller, flex services and flex .as files.
Now we want to generate the Unit Test Case. Of course, we can't cover everything. What we can cover is most domain fields validation, such as length, max value, min value and perhaps regex matching.

So, what I'm looking for is a library that allow me to generate a valid and invalid String based on a given Regex pattern. So far, I have found Google Xeger, which only allow me to generate valid String based on the Regex pattern. I'm also looking for a library that will allow me tpo generate invalid String for a given regex.

Anyone know of such library. I really don't want to parse the Regex to come up with an invalid String (as I am not strong in Regex).
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2012
Added on Feb 21 2012
6 comments
455 views