[arquillian-issues] [JBoss JIRA] Commented: (ARQ-337) Create a Context/Scope activation/deactivation abstraction for CDI

Krzysztof Kowalczyk (JIRA) jira-events at lists.jboss.org
Tue May 10 04:49:18 EDT 2011


    [ https://issues.jboss.org/browse/ARQ-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600914#comment-12600914 ] 

Krzysztof Kowalczyk commented on ARQ-337:
-----------------------------------------

I have a small use case, that could be solved by this feature.
I would like to be able to end existing request scope and move to another in one test (same with other scopes).

So I could write a test like:
{code}
@Inject ScopedIncrementer inc;

@Test
public void shallReturnDifferentValueBetweenRequests(){
   int firstRequest = inc.getRequestScopedValue()
   contextController.end(RequestScope.class)
   contextController.start(RequestScope.class/*, mockData ?*/)
   int secondRequest = inc.getRequestScopedValue()

   assertTrue(firstRequest < secondRequest)
}
{code}

> Create a Context/Scope activation/deactivation abstraction for CDI 
> -------------------------------------------------------------------
>
>                 Key: ARQ-337
>                 URL: https://issues.jboss.org/browse/ARQ-337
>             Project: Arquillian
>          Issue Type: Feature Request
>          Components: Runtime Enricher SPI
>            Reporter: Aslak Knutsen
>            Assignee: Paul Bakker
>
> We need to have a stable and reliable api exposed by arquillian over the different container types and CDI impls to control the activation and deactivation of different scopes

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list