Re: Re: Spindle compatability test suite

"Hugo Palma" <[email protected]> Fri, 12 May 2006 10:18:24 +0100
Newsgroups gmane.comp.ide.eclipse.spindle.devel
Message-ID <[email protected]>
------=_Part_4739_12690770.1147425504153
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

inline

On 5/12/06, Geoff Longman <[email protected]> wrote:
>
> Ok. I see what you have. A fixture is an interface to build a
> "project" with context and classpath for testing. Can provide or point
> me to (in you repo) an example of a Test?


I'll upload the test suite and an example test tonight. I'll post again whe=
n
it's available.

On 5/10/06, Hugo Palma <[email protected]> wrote:
> > Forgot to mention how the tested class implementation would be served t=
o
> > the test class.
>
> ok, I'm lost at this point. "tested class implementation" is?


The test suite is supposed to test the implementation of abstract concepts.
As such, the test suite only works with ICoreResource, IResourceRoot, and s=
o
on. The respective implementation, the "tested class implementation", has t=
o
be provided to the test suite by the IDE specific implementation module.
Anyway, i think it will be clear when you look at the example code.

Geoff
>
> > I got this working by declaring a hivemind service for each tested clas=
s
> > in spindle-tests and then providing the implementation in the IDE
> > implementation module. There's also an utility method in
> > AbstractSpindleTestCase that gets the tested class implementation.
> > I'm not crazy about having to declare every tested class in the hivemin=
d
> > descriptor but i couldn't find a better way of doing this.
> >
> >
> > Hugo Palma wrote:
> > > I told you i wouldn't let you forget about this :o)
> > >
> > > I took advantage of a few dead hours in my day job to give this some
> > > thought. After some experimenting i came up with some ideas and some
> > > code also.
> > >
> > > There should be a separate module(spindle-tests) with all the
> > > framework classes and the tests themselves.
> > >
> > > The framework consists of one interface, one class and one hivemind
> > > descriptor. The interface is IFixture, it provides the signature for
> > > all operations that can be executed in a fixture. A fresh instance of
> > > the fixture will be provided to each test class at every test run.
> > > I've come up with the following code for now, still some operations
> > > missing but good for getting the main picture:
> > >
> > > /**
> > >  * A test fixture. Should have an implementation for each IDE.
> > >  */
> > > public interface IFixture<W, F>
> > > {
> > >     /**
> > >      * Adds a web root.
> > >      *
> > >      * @param filePath     the absolute path to the web root
> directory.
> > >      * @param relativePath the relative path of the web root. Some
> > > IDEs let the user specify a different relative path for each web root=
,
> > > changing the default "/" path.
> > >      * @return the added web root.
> > >      */
> > >     W addWebRoot(String filePath, String relativePath);
> > >
> > >     /**
> > >      * Adds a web root with the default "/" relative path.
> > >      *
> > >      * @param filePath the absolute path to the web root directory.
> > >      * @return the added web root.
> > >      */
> > >     W addWebRoot(String filePath);
> > >
> > >     /**
> > >      * Adds an empty file to a web root.
> > >      *
> > >      * @param webRoot the web root to add the file to.
> > >      * @param path    the absolute path of the file to be added.
> > >      * @return the added file.
> > >      */
> > >     F addFileToWebRoot(W webRoot, String path);
> > >
> > >     /**
> > >      * Adds a source root.
> > >      *
> > >      * @param filePath the absolute path to the source root directory=
.
> > >      * @return the added source root.
> > >      */
> > >     F addSourceRoot(String filePath);
> > >
> > >     /**
> > >      * Adds an empty class to a source root.
> > >      *
> > >      * @param root        the source root to add the class to.
> > >      * @param packageName the class package.
> > >      * @param className   the class name.
> > >      */
> > >     void addClassToSourceRoot(F root, String packageName, String
> > > className);
> > >
> > >     /**
> > >      * Adds a .jar file to the classpath.
> > >      *
> > >      * @param jarFile the .jar file to add to the classpath.
> > >      */
> > >     void addJarToClasspath(F jarFile);
> > >
> > >     /**
> > >      * Adds a file to a source root.
> > >      *
> > >      * @param root        the source root to add the file to.
> > >      * @param packageName the package to add the file to.
> > >      * @param fileName    the absolute path to the file to be added.
> > >      */
> > >     void addFileToSourceRoot(F root, String packageName, String
> > > fileName);
> > >
> > >     /**
> > >      * Tears down the fixture.
> > >      */
> > >     void tearDown();
> > > }
> > >
> > >
> > > The base class for all tests is also provided. I called it
> > > AbstractSpindleTestCase. This class provides a getFixture() method to
> > > every subclass and is responsible for getting the fresh fixture
> > > instance from Hivemind at every test run. Here's the code i came up
> with:
> > >
> > > /**
> > >  * Base class for all test classes.
> > >  *
> > >  * @author Hugo Palma
> > >  */
> > > public abstract class AbstractSpindleTestCase extends TestCase
> > > {
> > >     private IFixture _fixture;
> > >     private static Registry _registry;
> > >
> > >     {
> > >         _registry =3D RegistryBuilder.constructDefaultRegistry();
> > >     }
> > >
> > >     /**
> > >      * {@inheritDoc}
> > >      */
> > >     protected void setUp() throws Exception
> > >     {
> > >         super.setUp();
> > >
> > >         // Allows getting a brand new IFixture instance every time.
> > >         _registry.cleanupThread();
> > >         _registry.setupThread();
> > >
> > >         _fixture =3D (IFixture) _registry.getService(IFixture.class )=
;
> > >     }
> > >
> > >     /**
> > >      * {@inheritDoc}
> > >      */
> > >     protected void tearDown() throws Exception
> > >     {
> > >         super.tearDown();
> > >
> > >         // Cleanup the fixture.
> > >         _fixture.tearDown();
> > >         _fixture =3D null;
> > >     }
> > >
> > >     protected IFixture getFixture()
> > >     {
> > >         return _fixture;
> > >     }
> > > }
> > >
> > > The only thing missing is the hivemodule.xml in the spindle-tests
> module:
> > >
> > > <module id=3D" net.sf.spindle.tests" version=3D"1.0.0">
> > >     <service-point id=3D"fixture"
> > > interface=3D"net.sf.spindle.tests.IFixture"/>
> > > </module>
> > >
> > > So, given this, all the IDE has to do is:
> > >
> > > - Create an implementation of the IFixture interface.
> > > - Provide a hivemodule.xml file in it's spindle-core implementation
> > > module with something like:
> > >
> > >   <module id=3D"org.intellij.tapestry" version=3D" 1.0.0">
> > >     <dependency module-id=3D"net.sf.spindle.tests" version=3D"1.0.0"/=
>
> > >
> > >     <implementation service-id=3D"net.sf.spindle.tests.fixture">
> > >         <invoke-factory model=3D"threaded">
> > >             <construct class=3D"org.intellij.tapestry.test.Fixture"/>
> > >         </invoke-factory>
> > >     </implementation>
> > > </module>
> > > - Execute the tests. I managed to run the tests from IDEA with no
> > > problem. I'm going to see how/if i can run tests from a jar file with
> > > Maven2.
> > >
> > >
> > > Thoughts ?
> >
> >
> > -------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services,
> security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> > _______________________________________________
> > Spindle-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/spindle-developer
> >
>
>
> --
> The Spindle guy. http://spindle.sf.net
> Blog:                  http://jroller.com/page/glongman
> Other interests:  http://www.squidoo.com/spaceelevator/
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim=
o
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=120709&bid&3057&dat=121642
> _______________________________________________
> Spindle-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spindle-developer
>

------=_Part_4739_12690770.1147425504153
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

inline<br><br><div><span class=3D"gmail_quote">On 5/12/06, <b class=3D"gmai=
l_sendername">Geoff Longman</b> &lt;<a href=3D"mailto:[email protected]">g=
[email protected]</a>&gt; wrote:</span><blockquote class=3D"gmail_quote" st=
yle=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex=
; padding-left: 1ex;">
Ok. I see what you have. A fixture is an interface to build a<br>&quot;proj=
ect&quot; with context and classpath for testing. Can provide or point<br>m=
e to (in you repo) an example of a Test?</blockquote><div><br>I'll upload t=
he test suite and an example test tonight. I'll post again when it's availa=
ble.=20
<br></div><br><blockquote class=3D"gmail_quote" style=3D"border-left: 1px s=
olid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On =
5/10/06, Hugo Palma &lt;<a href=3D"mailto:[email protected]">hugo.m.pa=
[email protected]
</a>&gt; wrote:<br>&gt; Forgot to mention how the tested class implementati=
on would be served to<br>&gt; the test class.<br><br>ok, I'm lost at this p=
oint. &quot;tested class implementation&quot; is?</blockquote><div><br>
The test suite is supposed to test the implementation of abstract concepts.=
 As such, the test suite only works with ICoreResource, IResourceRoot, and =
so on. The respective implementation, the &quot;tested class implementation=
&quot;, has to be provided to the test suite by the IDE specific implementa=
tion module.
<br>Anyway, i think it will be clear when you look at the example code.<br>=
</div><br><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid=
 rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Geoff<b=
r>
<br>&gt; I got this working by declaring a hivemind service for each tested=
 class<br>&gt; in spindle-tests and then providing the implementation in th=
e IDE<br>&gt; implementation module. There's also an utility method in<br>
&gt; AbstractSpindleTestCase that gets the tested class implementation.<br>=
&gt; I'm not crazy about having to declare every tested class in the hivemi=
nd<br>&gt; descriptor but i couldn't find a better way of doing this.<br>
&gt;<br>&gt;<br>&gt; Hugo Palma wrote:<br>&gt; &gt; I told you i wouldn't l=
et you forget about this :o)<br>&gt; &gt;<br>&gt; &gt; I took advantage of =
a few dead hours in my day job to give this some<br>&gt; &gt; thought. Afte=
r some experimenting i came up with some ideas and some
<br>&gt; &gt; code also.<br>&gt; &gt;<br>&gt; &gt; There should be a separa=
te module(spindle-tests) with all the<br>&gt; &gt; framework classes and th=
e tests themselves.<br>&gt; &gt;<br>&gt; &gt; The framework consists of one=
 interface, one class and one hivemind
<br>&gt; &gt; descriptor. The interface is IFixture, it provides the signat=
ure for<br>&gt; &gt; all operations that can be executed in a fixture. A fr=
esh instance of<br>&gt; &gt; the fixture will be provided to each test clas=
s at every test run.
<br>&gt; &gt; I've come up with the following code for now, still some oper=
ations<br>&gt; &gt; missing but good for getting the main picture:<br>&gt; =
&gt;<br>&gt; &gt; /**<br>&gt; &gt;&nbsp;&nbsp;* A test fixture. Should have=
 an implementation for each IDE.
<br>&gt; &gt;&nbsp;&nbsp;*/<br>&gt; &gt; public interface IFixture&lt;W, F&=
gt;<br>&gt; &gt; {<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&gt; &gt;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Adds a web root.<br>&gt; &gt;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
* @param filePath&nbsp;&nbsp;&nbsp;&nbsp; the absolute path to the web root=
 directory.
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param relativePath the =
relative path of the web root. Some<br>&gt; &gt; IDEs let the user specify =
a different relative path for each web root,<br>&gt; &gt; changing the defa=
ult &quot;/&quot; path.<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @return the added web root.<=
br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&gt; &gt;&nbsp;&nbsp;=
&nbsp;&nbsp; W addWebRoot(String filePath, String relativePath);<br>&gt; &g=
t;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;* Adds a web root with the default &quot;/&quot; relative =
path.
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&gt; &gt;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;* @param filePath the absolute path to the web root=
 directory.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @return the a=
dded web root.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&gt; &=
gt;&nbsp;&nbsp;&nbsp;&nbsp; W addWebRoot(String filePath);<br>
&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&gt; &gt;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;* Adds an empty file to a web root.<br>&gt; &gt;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;* @param webRoot the web root to add the file to.<br>&gt; &gt;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param path&nbsp;&nbsp;&nbsp;&nbsp;the abs=
olute path of the file to be added.
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @return the added file.<=
br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&gt; &gt;&nbsp;&nbsp;=
&nbsp;&nbsp; F addFileToWebRoot(W webRoot, String path);<br>&gt; &gt;<br>&g=
t; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;* Adds a source root.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;*<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param filePath the absolute=
 path to the source root directory.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;* @return the added source root.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;*/<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; F addSourceRoot(Stri=
ng filePath);<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /**
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Adds an empty class to a=
 source root.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&gt; &gt=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param root&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;the source root to add the class to.<br>&gt; &gt;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param packageName the class package.<br=
>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param className&nbsp;&nbsp=
; the class name.
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&gt; &gt;&nbsp;&nbsp=
;&nbsp;&nbsp; void addClassToSourceRoot(F root, String packageName, String<=
br>&gt; &gt; className);<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; =
/**<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Adds a .jar file to t=
he classpath.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param jarFile the .jar =
file to add to the classpath.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;*/<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; void addJarToClasspath(F jarFile=
);<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&gt; &gt;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Adds a file to a source root.
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&gt; &gt;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;* @param root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;the source root to add the file to.<br>&gt; &gt;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;* @param packageName the package to add the file to.<br>=
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param fileName&nbsp;&nbsp;&=
nbsp;&nbsp;the absolute path to the file to be added.
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&gt; &gt;&nbsp;&nbsp=
;&nbsp;&nbsp; void addFileToSourceRoot(F root, String packageName, String<b=
r>&gt; &gt; fileName);<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /*=
*<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Tears down the fixture.=
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; void tearDown();<br>&gt; &gt; }<br>&g=
t; &gt;<br>&gt; &gt;<br>&gt; &gt; The base class for all tests is also prov=
ided. I called it<br>&gt; &gt; AbstractSpindleTestCase. This class provides=
 a getFixture() method to
<br>&gt; &gt; every subclass and is responsible for getting the fresh fixtu=
re<br>&gt; &gt; instance from Hivemind at every test run. Here's the code i=
 came up with:<br>&gt; &gt;<br>&gt; &gt; /**<br>&gt; &gt;&nbsp;&nbsp;* Base=
 class for all test classes.
<br>&gt; &gt;&nbsp;&nbsp;*<br>&gt; &gt;&nbsp;&nbsp;* @author Hugo Palma<br>=
&gt; &gt;&nbsp;&nbsp;*/<br>&gt; &gt; public abstract class AbstractSpindleT=
estCase extends TestCase<br>&gt; &gt; {<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp=
; private IFixture _fixture;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; private s=
tatic Registry _registry;
<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt; &gt;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _registry =3D RegistryBuilder.constr=
uctDefaultRegistry();<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; &gt;<b=
r>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;* {@inheritDoc}<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;*/<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; protected void setUp() throws Exception<b=
r>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; super.setUp();<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Allows getting a brand new IFixtur=
e instance every time.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; _registry.cleanupThread();
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _registry.set=
upThread();<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; _fixture =3D (IFixture) _registry.getService(IFixture.class );<b=
r>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;=
&nbsp;&nbsp; /**<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* {@inheri=
tDoc}
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&gt; &gt;&nbsp;&nbsp=
;&nbsp;&nbsp; protected void tearDown() throws Exception<br>&gt; &gt;&nbsp;=
&nbsp;&nbsp;&nbsp; {<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; super.tearDown();<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; // Cleanup the fixture.<br>&gt; &gt;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _fixture.tearDown();
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _fixture =3D =
null;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; &gt;<br>&gt; &gt;&nbsp=
;&nbsp;&nbsp;&nbsp; protected IFixture getFixture()<br>&gt; &gt;&nbsp;&nbsp=
;&nbsp;&nbsp; {<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; return _fixture;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; &gt; }<br=
>&gt; &gt;
<br>&gt; &gt; The only thing missing is the hivemodule.xml in the spindle-t=
ests module:<br>&gt; &gt;<br>&gt; &gt; &lt;module id=3D&quot; net.sf.spindl=
e.tests&quot; version=3D&quot;1.0.0&quot;&gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp=
;&nbsp; &lt;service-point id=3D&quot;fixture&quot;
<br>&gt; &gt; interface=3D&quot;net.sf.spindle.tests.IFixture&quot;/&gt;<br=
>&gt; &gt; &lt;/module&gt;<br>&gt; &gt;<br>&gt; &gt; So, given this, all th=
e IDE has to do is:<br>&gt; &gt;<br>&gt; &gt; - Create an implementation of=
 the IFixture interface.
<br>&gt; &gt; - Provide a hivemodule.xml file in it's spindle-core implemen=
tation<br>&gt; &gt; module with something like:<br>&gt; &gt;<br>&gt; &gt;&n=
bsp;&nbsp; &lt;module id=3D&quot;org.intellij.tapestry&quot; version=3D&quo=
t; 1.0.0&quot;&gt;
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependency module-id=3D&quot;net.=
sf.spindle.tests&quot; version=3D&quot;1.0.0&quot;/&gt;<br>&gt; &gt;<br>&gt=
; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;implementation service-id=3D&quot;net.sf=
.spindle.tests.fixture&quot;&gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp; &lt;invoke-factory model=3D&quot;threaded&quot;&gt;
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; &lt;construct class=3D&quot;org.intellij.tapestry.test.Fixture&q=
uot;/&gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;=
/invoke-factory&gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/implementatio=
n&gt;<br>&gt; &gt; &lt;/module&gt;<br>&gt; &gt; - Execute the tests. I mana=
ged to run the tests from IDEA with no
<br>&gt; &gt; problem. I'm going to see how/if i can run tests from a jar f=
ile with<br>&gt; &gt; Maven2.<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Though=
ts ?<br>&gt;<br>&gt;<br>&gt; ----------------------------------------------=
---------
<br>&gt; Using Tomcat but need to do more? Need to support web services, se=
curity?<br>&gt; Get stuff done quickly with pre-integrated technology to ma=
ke your job easier<br>&gt; Download IBM WebSphere Application Server v.1.0.=
1
 based on Apache Geronimo<br>&gt; <a href=3D"http://sel.as-us.falkag.net/se=
l?cmd=3Dlnk&amp;kid=3D120709&amp;bid=3D263057&amp;dat=3D121642">http://sel.=
as-us.falkag.net/sel?cmd=3Dlnk&amp;kid=3D120709&amp;bid=3D263057&amp;dat=3D=
121642</a><br>
&gt; _______________________________________________<br>&gt; Spindle-develo=
per mailing list<br>&gt; <a href=3D"mailto:[email protected]=
rge.net">[email protected]</a><br>&gt; <a href=3D"htt=
ps://lists.sourceforge.net/lists/listinfo/spindle-developer">
https://lists.sourceforge.net/lists/listinfo/spindle-developer</a><br>&gt;<=
br><br><br>--<br>The Spindle guy. <a href=3D"http://spindle.sf.net">http://=
spindle.sf.net</a><br>Blog:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=3D"http=
://jroller.com/page/glongman">
http://jroller.com/page/glongman</a><br>Other interests:&nbsp;&nbsp;<a href=
=3D"http://www.squidoo.com/spaceelevator/">http://www.squidoo.com/spaceelev=
ator/</a><br><br><br>------------------------------------------------------=
-<br>Using Tomcat but need to do more? Need to support web services, securi=
ty?
<br>Get stuff done quickly with pre-integrated technology to make your job =
easier<br>Download IBM WebSphere Application Server v.1.0.1 based on Apache=
 Geronimo<br><a href=3D"http://sel.as-us.falkag.net/sel?cmdlnk&amp;kid=1207=
09&amp;bid&amp;3057&amp;dat=121642">
http://sel.as-us.falkag.net/sel?cmdlnk&amp;kid=120709&amp;bid&amp;3057&amp;=
dat=121642</a><br>_______________________________________________<br>Spindl=
e-developer mailing list<br><a href=3D"mailto:[email protected]=
eforge.net">
[email protected]</a><br><a href=3D"https://lists.sou=
rceforge.net/lists/listinfo/spindle-developer">https://lists.sourceforge.ne=
t/lists/listinfo/spindle-developer</a><br></blockquote></div><br>

------=_Part_4739_12690770.1147425504153--


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642