>>> Caused by: java.lang.RuntimeException: Service id 'xyzConfig' is
>>> not defined by any module.  Defined services: AccessDecisionManager,
>>> ... VirtualAssetStreamer.
>> Something is trying to look up a service with id "xyzConfig" - using that 
>> id. I assume you have something like this in your page:
>>
>>    @Inject
>>    @Service("xyzConfig")
>>    private XyzConfig config;
>>
>> If that's true then it might simply be that you haven't got a 
>> @ForComponents annotation on your xyzConfig mock. Also, if you name the 
>> service (using the @Service annotation) then you need to name it in the 
>> @ForComponents too:
>>
>> public class GamesLauncherTest extends AbstractPageTest {
>>
>>     @ForComponents @Mock
>>     private XyzManager xyzManager;
>>  
>>     @ForComponents("xyzConfig") @Mock
>>     private XyzConfig xyzConfig;
> 
> OK, I'll try that.

That didn't work either.

So now I've started out copy paste of example code to my code base,
to see if the MessagePage and ForComponentsJustMockTest examples
would work, and they don't. Same error message.

My current guess is that @ForComponents is pulling in and handling
binding from my real AppManager, even though it is in no way part
of the test.

Does anyone have a clue?

Mats


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to