use of bio.terra.workspace.generated.model.ApiGcpBigQueryDataTableAttributes in project terra-workspace-manager by DataBiosphere.
the class MakeApiResourceDescriptionTest method mapReferencedBigQueryDataTableTest.
@Test
public void mapReferencedBigQueryDataTableTest() throws Exception {
String projectId = RandomStringUtils.randomAlphabetic(12);
String datasetName = RandomStringUtils.randomAlphabetic(12);
String datatableName = RandomStringUtils.randomAlphabetic(12);
var resource = new ReferencedBigQueryDataTableResource(workspaceId, resourceId, resourceName, description, cloning, projectId, datasetName, datatableName);
ApiResourceDescription resourceDescription = resourceController.makeApiResourceDescription(resource);
validateWsmResource(resourceDescription);
ApiResourceAttributesUnion union = resourceDescription.getResourceAttributes();
ApiGcpBigQueryDataTableAttributes attributes = union.getGcpBqDataTable();
assertThat(attributes, is(notNullValue()));
assertEquals(attributes.getDatasetId(), datasetName);
assertEquals(attributes.getProjectId(), projectId);
assertEquals(attributes.getDataTableId(), datatableName);
}
Aggregations