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.

--
Kent Tong, Msc, MCSE, SCJP, CCSA, Delphi Certified
Manager of IT Dept, CPTTM
Authorized training for Borland, Cisco, Microsoft, Oracle, RedFlag & RedHat

Reply via email to