File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed
main/java/com/linkedin/datahub/graphql/types/entitytype
test/java/com/linkedin/datahub/graphql/types/entitytype Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,6 @@ public class EntityTypeUrnMapper {
7777 .put (
7878 Constants .BUSINESS_ATTRIBUTE_ENTITY_NAME ,
7979 "urn:li:entityType:datahub.businessAttribute" )
80- .put (
81- Constants .DATA_PROCESS_INSTANCE_ENTITY_NAME ,
82- "urn:li:entityType:datahub.dataProcessInstance" )
8380 .build ();
8481
8582 private static final Map <String , String > ENTITY_TYPE_URN_TO_NAME =
Original file line number Diff line number Diff line change 1+ package com .linkedin .datahub .graphql .types .entitytype ;
2+
3+ import static org .testng .Assert .*;
4+
5+ import com .linkedin .datahub .graphql .generated .EntityType ;
6+ import com .linkedin .metadata .Constants ;
7+ import org .testng .annotations .Test ;
8+
9+ public class EntityTypeMapperTest {
10+
11+ @ Test
12+ public void testGetType () throws Exception {
13+ assertEquals (EntityTypeMapper .getType (Constants .DATASET_ENTITY_NAME ), EntityType .DATASET );
14+ }
15+
16+ @ Test
17+ public void testGetName () throws Exception {
18+ assertEquals (EntityTypeMapper .getName (EntityType .DATASET ), Constants .DATASET_ENTITY_NAME );
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ package com .linkedin .datahub .graphql .types .entitytype ;
2+
3+ import static org .testng .Assert .*;
4+
5+ import com .linkedin .datahub .graphql .generated .EntityType ;
6+ import com .linkedin .metadata .Constants ;
7+ import org .testng .annotations .Test ;
8+
9+ public class EntityTypeUrnMapperTest {
10+
11+ @ Test
12+ public void testGetName () throws Exception {
13+ assertEquals (
14+ EntityTypeUrnMapper .getName ("urn:li:entityType:datahub.dataset" ),
15+ Constants .DATASET_ENTITY_NAME );
16+ }
17+
18+ @ Test
19+ public void testGetEntityType () throws Exception {
20+ assertEquals (
21+ EntityTypeUrnMapper .getEntityType ("urn:li:entityType:datahub.dataset" ), EntityType .DATASET );
22+ }
23+
24+ @ Test
25+ public void testGetEntityTypeUrn () throws Exception {
26+ assertEquals (
27+ EntityTypeUrnMapper .getEntityTypeUrn (Constants .DATASET_ENTITY_NAME ),
28+ "urn:li:entityType:datahub.dataset" );
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments