Search in sources :

Example 1 with ServerSideAuthProvider

use of org.activityinfo.server.authentication.ServerSideAuthProvider in project activityinfo by bedatadriven.

the class HostControllerTest method setup.

@Before
public void setup() {
    DeploymentConfiguration deploymentConfig = new DeploymentConfiguration(new Properties());
    authProvider = new ServerSideAuthProvider();
    authProvider.clear();
    entityManager = createMock(EntityManager.class);
    expect(entityManager.find(User.class, 3)).andReturn(new User()).anyTimes();
    replay(entityManager);
    resource = new HostController(authProvider, Providers.of(entityManager));
}
Also used : ServerSideAuthProvider(org.activityinfo.server.authentication.ServerSideAuthProvider) EntityManager(javax.persistence.EntityManager) User(org.activityinfo.server.database.hibernate.entity.User) AuthenticatedUser(org.activityinfo.legacy.shared.AuthenticatedUser) Properties(java.util.Properties) DeploymentConfiguration(org.activityinfo.server.DeploymentConfiguration) Before(org.junit.Before)

Aggregations

Properties (java.util.Properties)1 EntityManager (javax.persistence.EntityManager)1 AuthenticatedUser (org.activityinfo.legacy.shared.AuthenticatedUser)1 DeploymentConfiguration (org.activityinfo.server.DeploymentConfiguration)1 ServerSideAuthProvider (org.activityinfo.server.authentication.ServerSideAuthProvider)1 User (org.activityinfo.server.database.hibernate.entity.User)1 Before (org.junit.Before)1