use of org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteKey in project beam by apache.
the class DatastoreV1Test method testDeleteKeyValidationSucceedsWithProject.
@Test
public void testDeleteKeyValidationSucceedsWithProject() throws Exception {
DeleteKey deleteKey = DatastoreIO.v1().deleteKey().withProjectId(PROJECT_ID);
deleteKey.validate(null);
}
use of org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteKey in project beam by apache.
the class DatastoreV1Test method testDeleteKeyDisplayData.
@Test
public void testDeleteKeyDisplayData() {
DeleteKey deleteKey = DatastoreIO.v1().deleteKey().withProjectId(PROJECT_ID);
DisplayData displayData = DisplayData.from(deleteKey);
assertThat(displayData, hasDisplayItem("projectId", PROJECT_ID));
}
use of org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteKey in project beam by apache.
the class DatastoreV1Test method testDeleteKeyValidationFailsWithNoProjectInStaticValueProvider.
@Test
public void testDeleteKeyValidationFailsWithNoProjectInStaticValueProvider() throws Exception {
DeleteKey deleteKey = DatastoreIO.v1().deleteKey().withProjectId(StaticValueProvider.<String>of(null));
thrown.expect(NullPointerException.class);
thrown.expectMessage("projectId");
deleteKey.validate(null);
}
use of org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteKey in project beam by apache.
the class DatastoreV1Test method testDeleteKeyValidationFailsWithNoProject.
@Test
public void testDeleteKeyValidationFailsWithNoProject() throws Exception {
DeleteKey deleteKey = DatastoreIO.v1().deleteKey();
thrown.expect(NullPointerException.class);
thrown.expectMessage("projectId ValueProvider");
deleteKey.validate(null);
}
Aggregations