Package br.gov.frameworkdemoiselle.context

Examples of br.gov.frameworkdemoiselle.context.SessionContext


    assertEquals("Value Changed", protectedMethods.getDummyAttrib());
  }

  @After
  public void deactiveContext() {
    SessionContext ctx = Beans.getReference(SessionContext.class);
    ctx.deactivate();
  }
View Full Code Here


    return deployment;
  }

  @Before
  public void activeContext() {
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
    sessionContext.activate();
    securityContext.login();
  }
View Full Code Here

  }

  @After
  public void deactiveContext() {
    securityContext.logout();
    SessionContext ctx = Beans.getReference(SessionContext.class);
    ctx.deactivate();
  }
View Full Code Here

    return deployment;
  }

  @Before
  public void activeContext() {
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
    sessionContext.activate();
    securityContext.login();
  }
View Full Code Here

  }

  @After
  public void deactiveContext() {
    securityContext.logout();
    SessionContext ctx = Beans.getReference(SessionContext.class);
    ctx.deactivate();
  }
View Full Code Here

    return deployment;
  }

  @Before
  public void activeContext() {
    SessionContext context = Beans.getReference(SessionContext.class);
    context.activate();
  }
View Full Code Here

    context.activate();
  }

  @After
  public void deactiveContext() {
    SessionContext context = Beans.getReference(SessionContext.class);
    context.deactivate();
  }
View Full Code Here

 
  @Test
  public void checkSeparatedStores(){
   
    ConversationContext conversationContext = Beans.getReference(ConversationContext.class);
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
   
    conversationContext.activate();
    sessionContext.activate();
   
    ConversationBean conversationBean = Beans.getReference(ConversationBean.class);
    conversationBean.getData();
   
    SessionBean sessionBean = Beans.getReference(SessionBean.class);
    sessionBean.getData();
   
    Bean<?> conversationContextual = Beans.getBeanManager().getBeans(ConversationBean.class).iterator().next();
    Bean<?> sessionContextual = Beans.getBeanManager().getBeans(SessionBean.class).iterator().next();
   
    Assert.assertNotNull( conversationContext.get(conversationContextual) );
    Assert.assertNull( conversationContext.get(sessionContextual) );
   
    Assert.assertNotNull( sessionContext.get(sessionContextual) );
    Assert.assertNull( sessionContext.get(conversationContextual) );
   
  }
View Full Code Here

    return deployment;
  }

  @Before
  public void activeContext() {
    SessionContext context = Beans.getReference(SessionContext.class);
    context.activate();
    pagination = paginationContext.getPagination(DummyEntity.class, true);
  }
View Full Code Here

    pagination = paginationContext.getPagination(DummyEntity.class, true);
  }

  @After
  public void deactiveContext() {
    SessionContext context = Beans.getReference(SessionContext.class);
    context.deactivate();
  }
View Full Code Here

TOP

Related Classes of br.gov.frameworkdemoiselle.context.SessionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.