struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <nicolas.del...@capgemini.com>
Subject [ANNONCE] XMLStubs 1.0.1 released
Date Tue, 04 May 2004 10:09:35 GMT

Hello guys,

I've released the first plublic version (1.0.1) of a simple tool : XMLStubs.

It allows you to replace an API defined by interfaces by an emulated one declared in XML files.
Jexl language (same as
JSP EL) is used to add conditional behaviour.

For example, if you need some implementation of IObject :

public interface IObject
{
    int getIntValue(String name);
}

You can define a stub for this interface like this :
<stub-beans dateFormat="dd/MM/yyyy">
	<stub-bean id="test" implements="net.sf.azote.xmlstubs.Interface">
		<method signature="getIntValue(java.lang.String)">
			<case condition="arg0 eq '4'">
				<value>4</value>
			</case>
			<case condition="arg0 eq '12'">
				<value>12</value>
			</case>
			<case>
				<throw throwable="java.lang.IllegalArgumentException"/>
			</case>
		</method>
	</stub-bean>
</stub-beans>It can return simple types, other stubs from interfaces, collections, maps,
javabeans (using default
constructor + setters) and result from static method calls (usefull for ValuedEnum)

I use it on my apps to build and make demos of the webapp while business tier is still in
dev.

It comes with simple support for Springframework, junit, dbunit and StrutsTestCase : when
you run a test, it loads an
XML file with same name as the test class to get stubs you can use in your test.

http://azote.sourceforge.net/xmlstubs.html


Nico.




Our name has changed, please update your address book to the following format for the latest
identities received "recipient@capgemini.com".

This message contains information that may be privileged or confidential and is the property
of the Capgemini Group. It is intended only for the person to whom it is addressed. If you
are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,
 distribute, or use this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.


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


Mime
View raw message