10 Sep 2006 16:07
Contributing a patch
Kent Tong <kent <at> cpttm.org.mo>
2006-09-10 14:07:51 GMT
2006-09-10 14:07:51 GMT
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
(Continue reading)
RSS Feed