Search in sources :

Example 1 with DeleteEntity

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);
}
Also used : DeleteEntity(org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteEntity) Test(org.junit.Test)

Example 2 with DeleteEntity

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));
}
Also used : DeleteEntity(org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteEntity) DisplayData(org.apache.beam.sdk.transforms.display.DisplayData) Test(org.junit.Test)

Example 3 with DeleteEntity

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);
}
Also used : DeleteEntity(org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteEntity) Test(org.junit.Test)

Example 4 with DeleteEntity

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);
}
Also used : DeleteEntity(org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteEntity) Test(org.junit.Test)

Aggregations

DeleteEntity (org.apache.beam.sdk.io.gcp.datastore.DatastoreV1.DeleteEntity)4 Test (org.junit.Test)4 DisplayData (org.apache.beam.sdk.transforms.display.DisplayData)1