Package org.openengsb.core.api.security

Examples of org.openengsb.core.api.security.AuthenticationContext


    private CommitConverter converter;

    @Before
    public void setUp() throws Exception {
        // mock auth context
        AuthenticationContext authenticationContext = mock(AuthenticationContext.class);
        when(authenticationContext.getAuthenticatedPrincipal()).thenReturn("testUser");

        // mock context
        ContextHolder contextHolder = ContextHolder.get();
        contextHolder.setCurrentContextId("testContext");
View Full Code Here


    protected static final String COMMITTER = "testuser";
    protected static final String CONTEXT = "testcontext";

    @Before
    public void initDB() throws Exception {
        AuthenticationContext authenticationContext = mock(AuthenticationContext.class);
        when(authenticationContext.getAuthenticatedPrincipal()).thenReturn(COMMITTER);
        EntityManager em = testPersistenceUnit.getEntityManager("edb");
        JPADao dao = new DefaultJPADao(em);
        EDBPreCommitHook preCommitHook = new CheckPreCommitHook(dao);
        ContextHolder.get().setCurrentContextId(CONTEXT);
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.security.AuthenticationContext

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.