use of org.sagebionetworks.bridge.TestConstants.TEST_APP_ID in project BridgeServer2 by Sage-Bionetworks.
the class InitRecordHandlerTest method setupContextWithJsonDataMap.
private UploadValidationContext setupContextWithJsonDataMap(Map<String, JsonNode> jsonDataMap) {
UploadValidationContext context = new UploadValidationContext();
// noinspection ConstantConditions
context.setUnzippedDataFileMap(Maps.transformEntries(jsonDataMap, (name, node) -> makeFileWithContent(name, node.toString())));
// Contexts always include appId.
context.setAppId(TEST_APP_ID);
// And upload (with upload ID and health code).
DynamoUpload2 upload = new DynamoUpload2();
upload.setHealthCode(HEALTH_CODE);
upload.setUploadId(UPLOAD_ID);
context.setUpload(upload);
return context;
}
use of org.sagebionetworks.bridge.TestConstants.TEST_APP_ID in project BridgeServer2 by Sage-Bionetworks.
the class AuthUtilsTest method getAccountEnrolledIn.
private Account getAccountEnrolledIn(String... studyIds) {
Account account = Account.create();
account.setId(TEST_USER_ID);
Set<Enrollment> enrollments = Arrays.asList(studyIds).stream().map(id -> Enrollment.create(TEST_APP_ID, id, TEST_USER_ID)).collect(toSet());
account.setEnrollments(enrollments);
return account;
}
Aggregations