Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.3.1.RELEASE
-
None
-
None
-
Linux 64-bit/mvn/usual stack
Description
The DataOnDemand feature doesn't take the regex property specified for a field into account when making the mock data, therefore failing the unit tests. This was previously logged but swept under the rug; it is a bug, however (it is trivial but can be confusing to new users, or users of Roo before this feature was available). I see why this isn't easy but it should probably be fixed (or have set types and not dynamic regex like that, even though it's probably too late).
I was thinking about it and may be able to come up with something but it's annoying me, since I like everything to be automated (simple workaround is just move the method into the .java class out of the .aj and specify something there). The difficult part is all the ways you can escape things in Java. I have a solution in mind (first recursively replace // -> / then replace any escape sequences, ignore bounds because who cares, and process the rest using something like RPN where you can account for groups of ();'s). I'd have to give it some thought.