Search in sources :

Example 1 with ClassificationAssociateRequest

use of org.apache.atlas.model.instance.ClassificationAssociateRequest in project incubator-atlas by apache.

the class TestEntitiesREST method testTagToMultipleEntities.

@Test(dependsOnMethods = "testCreateOrUpdateEntities")
public void testTagToMultipleEntities() throws Exception {
    AtlasClassification tag = new AtlasClassification(TestUtilsV2.CLASSIFICATION, new HashMap<String, Object>() {

        {
            put("tag", "tagName");
        }
    });
    ClassificationAssociateRequest classificationAssociateRequest = new ClassificationAssociateRequest(createdGuids, tag);
    entityREST.addClassification(classificationAssociateRequest);
    for (String guid : createdGuids) {
        final AtlasClassification result_tag = entityREST.getClassification(guid, TestUtilsV2.CLASSIFICATION);
        Assert.assertNotNull(result_tag);
        Assert.assertEquals(result_tag, tag);
    }
}
Also used : ClassificationAssociateRequest(org.apache.atlas.model.instance.ClassificationAssociateRequest) AtlasClassification(org.apache.atlas.model.instance.AtlasClassification) Test(org.testng.annotations.Test)

Aggregations

AtlasClassification (org.apache.atlas.model.instance.AtlasClassification)1 ClassificationAssociateRequest (org.apache.atlas.model.instance.ClassificationAssociateRequest)1 Test (org.testng.annotations.Test)1