Search in sources :

Example 6 with XXContextEnricherDef

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

the class TestRangerServiceDefServiceBase method test14populateRangerContextEnricherDefToXXnullValue.

@Test
public void test14populateRangerContextEnricherDefToXXnullValue() {
    RangerContextEnricherDef rangerContextEnricherDefObj = null;
    XXContextEnricherDef contextEnricherDefObj = null;
    XXServiceDef serviceDefObj = null;
    Mockito.when(restErrorUtil.createRESTException("RangerServiceDef cannot be null.", MessageEnums.DATA_NOT_FOUND)).thenThrow(new WebApplicationException());
    thrown.expect(WebApplicationException.class);
    XXContextEnricherDef dbContextEnricherDef = rangerServiceDefService.populateRangerContextEnricherDefToXX(rangerContextEnricherDefObj, contextEnricherDefObj, serviceDefObj, 1);
    Assert.assertNull(dbContextEnricherDef);
}
Also used : XXServiceDef(org.apache.ranger.entity.XXServiceDef) RangerContextEnricherDef(org.apache.ranger.plugin.model.RangerServiceDef.RangerContextEnricherDef) WebApplicationException(javax.ws.rs.WebApplicationException) XXContextEnricherDef(org.apache.ranger.entity.XXContextEnricherDef) Test(org.junit.Test)

Aggregations

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