HiveMind CVS should be passing all unit tests.  I don't check in unless it does.

Not sure what you are trying to create;  sounds to me like you want a 
ServiceImplementationFactory
that uses EasyMock to create the service implementation?

That's really easy:

create a service that implements ServiceImplementationFactory, i.e.

public class MockServiceFactory implements ServiceImplementationFactory
{

    public Object createCoreServiceImplementation(
        String serviceId,
        Class serviceInterface,
        Module invokingModule,
        List parameters)
    {
                MockControl control = 
MockControl.createStrictControl(serviceInterace);
                
                control.replay();
                
                return control.getMock();
    }

}

That'll return a service implementation that will throw an exception if you 
invoke any methods on
it.  You can then use invoke-factory on this service, instead of 
hivemind.BuilderFactory.  Sweet!

hivemind.lib includes a factory that creates an empty/default implementation 
that does nothing ...
all the methods just return void, 0 or false.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 19, 2004 5:13 PM
> To: [EMAIL PROTECTED]
> Subject: Stuck w/hivemind, please help :-)
> 
> 
> Hi Howard,
> 
> 
> just talked my project into using Hivemind and now I have to eat my 
> words...
> 
> 
> We're in the starting phase, all we have is interfaces. To 
> get started, 
> we want Hivemind to return an Easymock object. I guess, I need an 
> object provider? The docs are thin, the mailing list doesn't have an 
> archive... pretty please?
> 
> so, maybe like this?
> 
> module (id=foo version="0.0.1")
> {
>      service-point (id=Repository interface=foo.repository.Repository)
> 
>      provider 
> (prefix=service-property:testing.foo.MockService:getRepository)
> 
> 
>      service-point (id=MockService 
> interface=testing.plaengine.MockService) {
>          create-instance (class=test.plaengine.MockServiceImpl)
>      }
> 
> }
> 
> public interface MockService {
> 
>       foo.repository.Repository getRepository(); // impl 
> creates an easymock 
> instance
> }
> 
> Well, hivemind-1.0-beta-1 doesn't like the colons, 
> hivemind-cvs doesn't 
> pass the unit tests...
> 
> 
> Many thanks in advance,
> 
> )-(agen
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to