Author |
Message |
12/16/2008 11:49:53
|
Hamlet
neo
Joined: 08/11/2008 18:40:23
Messages: 8
Offline
|
I wanted to write a quick JUnit test to make some basic assertions about my project's terracotta.xml file. I just want to have a test fail in case someone changes locations of classes or renames a field that is referenced without updating the terracotta.xml.
It's simple to make assertions about the <class-expression>, <method-expression>, and <field-name> nodes that do not contain the regex style wildcards. But some fields do have those wildcards, for instance:
<method-expression>* com.example.MyInstance.*(..)</method-expression>
Is there a standard library that can be used to quickly resolve these into a set of references from my project?
|
|
|
12/16/2008 17:59:20
|
amiller
ophanim
Joined: 08/29/2007 09:05:48
Messages: 722
Location: St. Louis, MO
Offline
|
I'm not sure whether the TC Config Checker (http://wiki.terracotta.org/confluence/display/orgsite/TC+Config+Checker) does this or not, but if so could steal that code.
Seems like you could validate against our schema although I'm not sure how detailed the expressions are. The expressions themselves are Aspectwerkz expressions so I suspect there is some check that could be done in the Aspectwerkz code.
Also, our Eclipse plugin is doing a ton of checking for warning validation, so I suspect there's code there as well.
Our site is down for maintenance at the moment, so there are a couple of pages I can't check...sorry about that. Depending what sounds most promising, I could point you in that direction.
|
Alex Miller (Terracotta Engineer) - Want to post to the forums? Sign up here |
|
|
12/16/2008 18:21:23
|
tgautier
seraphim
Joined: 06/05/2006 12:19:26
Messages: 1781
Offline
|
No, the tc-config checker really just does pattern matching looking for bad patterns.
|
|
|
12/18/2008 10:30:56
|
Hamlet
neo
Joined: 08/11/2008 18:40:23
Messages: 8
Offline
|
I posted a message to the AspectWerkz forum titled "Testing that a pointcut expression is contained within a set of classes/jar". We'll see if this is possible. Thanks guys.
|
|
|
|