1 Reply Latest reply on May 28, 2012 12:16 PM by blabno

    On ARQ-337

    Michal Huniewicz Newbie

      (Wrote the previous one in the wrong secion, I think)


      Hi there, I looked into ARQ-337 (activating/deactivating scopes) yesterday together with Aslak and here's what we came up with.

      Feedback expected.


      • At this moment, for test cases the following scopes are available: Request, Conversation, Session, Application.
      • I do not think this should change.
      • We may want to disable certain scopes or enable them. Both for an entire test case or (to override) a single test method.
      • Why we would do this:
        • To prevent bean from unnecessary scopes from loading.
        • To simulate certain environments (some may not have Conversation scope, such as EJB).
        • more?

      This is how I imagine the code would look like:



      @DisabledScopes({SessionScope.class, ApplicationScope.class})

      public class AnnotationTest {

           /// ...



           public void shouldBlah() {

           // ...