Search in sources :

Example 1 with BlobAuthorizerStub

use of org.activityinfo.store.spi.BlobAuthorizerStub in project activityinfo by bedatadriven.

the class XFormResourceTest method setUp.

@Before
public void setUp() throws IOException {
    objectifyService = ObjectifyService.begin();
    Provider<AuthenticatedUser> authProvider = Providers.of(new AuthenticatedUser("", USER_ID, "jorden@bdd.com"));
    resourceLocator = new ResourceLocatorSyncImpl(injector.getProvider(FormStorageProvider.class), authProvider, new PermissionOracle(injector.getProvider(EntityManager.class)), new BlobAuthorizerStub());
    OdkFormFieldBuilderFactory fieldFactory = new OdkFormFieldBuilderFactory(resourceLocator);
    AuthTokenProvider tokenService = new AuthTokenProvider();
    TestBlobstoreService blobstore = new TestBlobstoreService(injector.getInstance(DeploymentConfiguration.class), injector.getInstance(EntityManager.class));
    TestInstanceIdService idService = new TestInstanceIdService();
    SubmissionArchiver backupService = new SubmissionArchiver(new DeploymentConfiguration(new Properties()));
    formResource = new XFormResources(resourceLocator, authProvider, fieldFactory, tokenService);
    formSubmissionResource = new XFormSubmissionResource(getDispatcherSync(), resourceLocator, tokenService, blobstore, idService, backupService);
}
Also used : PermissionOracle(org.activityinfo.server.command.handler.PermissionOracle) Properties(java.util.Properties) AuthenticatedUser(org.activityinfo.legacy.shared.AuthenticatedUser) EntityManager(javax.persistence.EntityManager) BlobAuthorizerStub(org.activityinfo.store.spi.BlobAuthorizerStub) 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 PermissionOracle (org.activityinfo.server.command.handler.PermissionOracle)1 BlobAuthorizerStub (org.activityinfo.store.spi.BlobAuthorizerStub)1 Before (org.junit.Before)1