[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
junit test to verify terracotta.xml dso element contents  XML
Forum Index -> Terracotta Platform
Author Message
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?
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
[WWW]
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.
[WWW]
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.
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team