ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: getting const strings into antunit tests
Date Tue, 30 Oct 2007 05:44:59 GMT
On Mon, 29 Oct 2007, Steve Loughran <stevel@apache.org> wrote:


> Our solution was to add a new reference, so we can extract text from
> a java static member
> 
> testBadHost extends SSHTestExpectsFailure {
> 	
> 	action:host="missing.example.org";
> 
> 	expectedText CONSTANT
> 	"org.smartfrog.services.ssh.sshExec.ERROR_NO_HOST";
> 
> }
> 
> 
> you end up being immune to string changes, only to moved constants
> and people moving to fancy formatted strings.
> 
> seems to me, we could do the same with an ant resource,

Or with properties.

<property name="expected" javaConstant="..."/>

I think it would feel more natural in property.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message