You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ca...@usitc.gov on 2006/03/02 16:54:54 UTC

Message Annotations With Argument Causing Error in Unit Test

When I use the @Message annotation in the standard way e.g.:

@Message
public abstract String getPageTitle();

The Creator class doesn't have any problems creating a concrete instance
for testing.

When I try to add String args to the getter, as per the user docs, e.g.:

@Message
public abstract String getLineTotal(BigDecimal total);

The Creator class throws an ApplicationRuntimeException.  "Class $XX_0
does not contain a property named 'getYYY'."

The Creator doesn't seem to process the MessageAnnotationWorkers.  This
isn't a shock because the creator is very lightweight, and as the docs
say, not "quite the same as how the class is enhanced at runtime".

Is there another way of getting this working in my unit tests?

Otherwise I will have to remove the annotation/abstract method and
fallback to a concrete method that gets the Messages object and filters
the message string with my token.

Carlos

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org