Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sisu-users] Unexpected? connections between injectors via InjectTestCase

So, I've got a working first pass at an application using Sisu.
Various interior bits and pieces are tested with InjectTestCase.

I can launch the whole thing with a static method that creates an
injector and obtains the root object, and off it goes.

Once it's running, it's listening on a TCP port.

Now, I've got a client API that can talk to it, and I'm anticipating
that clients will also be built at Sisu applications.

So, I tried to set up a JUnit4 test case with an @Before that launched
the app, and some @Tests that spoke to it.

(Yes, I know, I should mock and use a real integration test strategy
for end-to-end.)

I was a bit surprised to get Guice errors that seemed to indicate that
the two were interacting.

To stick to the problem at hand, I backed off of using DI for the test
itself, since the client is still simple enough that it can be
constructed by hand just fine.

If your response to this is that it should work and I must have done
something dumb, I'll trot off to debug it.


Back to the top