use of org.sagebionetworks.bridge.dynamodb.DynamoUploadSchema in project BridgeServer2 by Sage-Bionetworks.
the class UploadSchemaTest method getKeyFromEmptyApp.
@Test
public void getKeyFromEmptyApp() {
DynamoUploadSchema ddbUploadSchema = new DynamoUploadSchema();
ddbUploadSchema.setAppId("");
ddbUploadSchema.setSchemaId("test");
assertNull(ddbUploadSchema.getKey());
}
use of org.sagebionetworks.bridge.dynamodb.DynamoUploadSchema in project BridgeServer2 by Sage-Bionetworks.
the class UploadSchemaTest method getKeyFromBlankApp.
@Test
public void getKeyFromBlankApp() {
DynamoUploadSchema ddbUploadSchema = new DynamoUploadSchema();
ddbUploadSchema.setAppId(" ");
ddbUploadSchema.setSchemaId("test");
assertNull(ddbUploadSchema.getKey());
}
use of org.sagebionetworks.bridge.dynamodb.DynamoUploadSchema in project BridgeServer2 by Sage-Bionetworks.
the class UploadSchemaTest method keyWithEmptyApp.
@Test(expectedExceptions = IllegalArgumentException.class)
public void keyWithEmptyApp() {
DynamoUploadSchema ddbUploadSchema = new DynamoUploadSchema();
ddbUploadSchema.setKey(":test");
}
use of org.sagebionetworks.bridge.dynamodb.DynamoUploadSchema in project BridgeServer2 by Sage-Bionetworks.
the class UploadSchemaTest method getAppAndSchemaFromKey.
@Test
public void getAppAndSchemaFromKey() {
DynamoUploadSchema ddbUploadSchema = new DynamoUploadSchema();
ddbUploadSchema.setKey(TEST_APP_ID + ":test");
assertEquals(ddbUploadSchema.getAppId(), TEST_APP_ID);
assertEquals(ddbUploadSchema.getStudyId(), TEST_APP_ID);
assertEquals(ddbUploadSchema.getSchemaId(), "test");
}
use of org.sagebionetworks.bridge.dynamodb.DynamoUploadSchema in project BridgeServer2 by Sage-Bionetworks.
the class UploadSchemaTest method schemaKeyObject.
@Test
public void schemaKeyObject() {
DynamoUploadSchema schema = new DynamoUploadSchema();
schema.setAppId(TEST_APP_ID);
schema.setSchemaId("test-schema");
schema.setRevision(7);
assertEquals(schema.getSchemaKey().toString(), TEST_APP_ID + "-test-schema-v7");
}
Aggregations