Search in sources :

Example 6 with XXEnumElementDef

use of org.apache.ranger.entity.XXEnumElementDef in project ranger by apache.

the class TestRangerServiceDefServiceBase method test20populateXXToRangerEnumElementDef.

@Test
public void test20populateXXToRangerEnumElementDef() {
    XXEnumElementDef enumElementDefObj = new XXEnumElementDef();
    enumElementDefObj.setAddedByUserId(Id);
    enumElementDefObj.setCreateTime(new Date());
    enumElementDefObj.setEnumdefid(Id);
    enumElementDefObj.setId(Id);
    enumElementDefObj.setLabel("Simple");
    enumElementDefObj.setName("simple");
    enumElementDefObj.setOrder(0);
    enumElementDefObj.setUpdatedByUserId(Id);
    enumElementDefObj.setUpdateTime(new Date());
    RangerEnumElementDef dbRangerEnumElementDef = rangerServiceDefService.populateXXToRangerEnumElementDef(enumElementDefObj);
    Assert.assertNotNull(dbRangerEnumElementDef);
    Assert.assertEquals(dbRangerEnumElementDef.getLabel(), enumElementDefObj.getLabel());
    Assert.assertEquals(dbRangerEnumElementDef.getName(), enumElementDefObj.getName());
}
Also used : XXEnumElementDef(org.apache.ranger.entity.XXEnumElementDef) RangerEnumElementDef(org.apache.ranger.plugin.model.RangerServiceDef.RangerEnumElementDef) Date(java.util.Date) Test(org.junit.Test)

Aggregations

XXEnumElementDef (org.apache.ranger.entity.XXEnumElementDef)6 XXEnumDef (org.apache.ranger.entity.XXEnumDef)5 RangerEnumElementDef (org.apache.ranger.plugin.model.RangerServiceDef.RangerEnumElementDef)4 Date (java.util.Date)3 XXContextEnricherDefDao (org.apache.ranger.db.XXContextEnricherDefDao)3 XXDataMaskTypeDefDao (org.apache.ranger.db.XXDataMaskTypeDefDao)3 XXEnumDefDao (org.apache.ranger.db.XXEnumDefDao)3 XXEnumElementDefDao (org.apache.ranger.db.XXEnumElementDefDao)3 XXPolicyConditionDefDao (org.apache.ranger.db.XXPolicyConditionDefDao)3 XXServiceConfigDefDao (org.apache.ranger.db.XXServiceConfigDefDao)3 XXAccessTypeDef (org.apache.ranger.entity.XXAccessTypeDef)3 XXContextEnricherDef (org.apache.ranger.entity.XXContextEnricherDef)3 XXDataMaskTypeDef (org.apache.ranger.entity.XXDataMaskTypeDef)3 XXPolicyConditionDef (org.apache.ranger.entity.XXPolicyConditionDef)3 XXResourceDef (org.apache.ranger.entity.XXResourceDef)3 XXServiceConfigDef (org.apache.ranger.entity.XXServiceConfigDef)3 RangerEnumDef (org.apache.ranger.plugin.model.RangerServiceDef.RangerEnumDef)3 Test (org.junit.Test)3 XXAccessTypeDefDao (org.apache.ranger.db.XXAccessTypeDefDao)2 XXAccessTypeDefGrantsDao (org.apache.ranger.db.XXAccessTypeDefGrantsDao)2