Hi;

I will check it via spec Mark! And also its great to start TCK stuffs.

Thanks;

/Gurkan




________________________________
From: Mark Struberg <[email protected]>
To: [email protected]
Sent: Sunday, January 18, 2009 12:18:07 AM
Subject: Context map question 

Hi!

I'm currently doing my first TCK runs and came to the following point I do not 
understand:

One of the tests [1] checks that it's not possible to to store 2 active 
Contexts for a Scope.

This works, but apart of that, our code seems to be even more restrictive:
ManagerImpl#contextMap is a Map, and the key is the scope.

So it will not be possible to store 1 active Context and other inactive 
Contexts.

I'm note sure if this is needed in praxis, but that's what the TCK says.

Although: 
> 9.1 The Context Interface
> The isActive() method returns false when the scope of the context 
> object is inactive, and true when it is active.
sounds more like gurkans implementation is correct!?

Any ideas?

txs and LieGrue,
strub

[1] webbeans-tck-impl 
org.jboss.webbeans.tck.tests.context.ContextTest#testGetContextWithTooManyActiveContextsFails

   @Test(expectedExceptions={IllegalArgumentException.class}, 
groups={"manager"}) @SpecAssertion(section="8.6")
   public void testGetContextWithTooManyActiveContextsFails()
   {
      Context firstContext = new DummyContext() {};
      Context secondContext = new DummyContext() {};
      manager.addContext(firstContext);
      manager.addContext(secondContext);
      manager.getContext(Dummy.class);
   }

in this test 'secondContext' simply overrides the 'firstContext' and 
getContext(Dummy.class) wont have problems getting the proper context.


      

Reply via email to