use of org.activityinfo.ui.client.dispatch.ResourceLocatorAdaptor in project activityinfo by bedatadriven.
the class GcsBlobFieldStorageServiceTest method uploadBlob.
@Before
public final void uploadBlob() throws IOException {
localServiceTestHelper.setUp();
ofy = ObjectifyService.begin();
blobService = injector.getInstance(GcsBlobFieldStorageService.class);
blobService.setTestBucketName();
locator = new ResourceLocatorAdaptor(new ActivityInfoClientAsyncStub(injector.getProvider(EntityManager.class), blobService));
AuthenticationModuleStub.setUserId(1);
user = new AuthenticatedUser("x", 1, "user1@user.com");
noAccessUser = new AuthenticatedUser("x", 3, "stefan@user.com");
blobId = BlobId.generate();
blobService.put(user, "attachment;filename=" + FILE_NAME, MimeTypeUtil.mimeTypeFromFileName(FILE_NAME), blobId, resourceId, GcsBlobFieldStorageServiceTest.class.getResourceAsStream("goabout.png"));
}
Aggregations