Please open three issues on jira and attach the
the patches. I can't promise you that number 1) and 2) will
make it in, but at least number 3) should make it.

Achim

Am Sun, 10 Sep 2006 16:07:51 +0200 schrieb Kent Tong <[EMAIL PROTECTED]>:

Hi,

I'd like to contribute a patch to address the following issues. Would
you please let me know if it is worth accepting? Then I can send you
the patch file.

1) Allow providing module descriptors using strings so that testing
can be done like:

        public void testCreateInstance() throws Exception
        {
                String module1 = "<?xml version=\"1.0\"?>"
                                + "<module id=\"com.myco.mypackage\" 
version=\"1.0.0\">"
+ " <service-point id=\"Adder\" interface=\"org.apache.hivemind.Adder\"/>"
                                + "</module>";
                String module2 = "<?xml version=\"1.0\"?>"
                                + "<module id=\"com.myco.mypackage.impl\" 
version=\"1.0.0\">"
                                + "  <implementation 
service-id=\"com.myco.mypackage.Adder\">"
                                + "  <create-instance 
class=\"org.apache.hivemind.AdderImpl\"/>"
                                + "  </implementation>" + "</module>";
                setupRegistry(new String[] { module1, module2 });
                Adder adder = (Adder) 
registry.getService("com.myco.mypackage.Adder",
                                Adder.class);
                assertNotNull(adder);
                assertEquals(adder.add(4, 5), 9);
        }


2) Allow overriding service implementations using specified objects.
This is useful when performing integration tests involving hivemind
services. As one hivemind service can bring in another. To stop it
we can use override a certain "boundary" service implementations using
stub/mock objects. I need this capacity to test Tapestry pages (eg,
provide a stub HttpServletRequest).

3) Fix a bug in FileResource. It didn't implement hashCode(). There
is a similar bug in URLResource.



Reply via email to