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