@Test void testCheckEntityTypeExistsFail() { when(dataService.hasEntityType("typeId")).thenReturn(false); assertThrows( UnknownEntityTypeException.class, () -> entityHelper.checkEntityTypeExists("entity-typeId")); }
public void checkEntityTypeExists(String typeId) { String entityTypeId = getEntityTypeIdFromType(typeId); if (!dataService.hasEntityType(entityTypeId)) { throw new UnknownEntityTypeException(typeId); } }
EntityHelper { public void checkEntityTypeExists(String typeId) { String entityTypeId = getEntityTypeIdFromType(typeId); if (!dataService.hasEntityType(entityTypeId)) { throw new UnknownEntityTypeException(typeId); } } }
EntityHelper { public void checkEntityTypeExists(String typeId) { String entityTypeId = getEntityTypeIdFromType(typeId); if (!dataService.hasEntityType(entityTypeId)) { throw new UnknownEntityTypeException(typeId); } } EntityHelper(DataService dataService); }
EntityHelper { public void checkEntityTypeExists(String typeId) { String entityTypeId = getEntityTypeIdFromType(typeId); if (!dataService.hasEntityType(entityTypeId)) { throw new UnknownEntityTypeException(typeId); } } EntityHelper(DataService dataService); ObjectIdentity getObjectIdentity(String classId, String objectIdentifier); String getLabel(String typeId, String untypedIdentifier); String getLabel(String typeId); LabelledObjectIdentity getLabelledObjectIdentity(ObjectIdentity objectIdentity); void checkEntityExists(ObjectIdentity objectIdentity); void checkEntityTypeExists(String typeId); void checkIsNotSystem(String typeId); }
EntityHelper { public void checkEntityTypeExists(String typeId) { String entityTypeId = getEntityTypeIdFromType(typeId); if (!dataService.hasEntityType(entityTypeId)) { throw new UnknownEntityTypeException(typeId); } } EntityHelper(DataService dataService); ObjectIdentity getObjectIdentity(String classId, String objectIdentifier); String getLabel(String typeId, String untypedIdentifier); String getLabel(String typeId); LabelledObjectIdentity getLabelledObjectIdentity(ObjectIdentity objectIdentity); void checkEntityExists(ObjectIdentity objectIdentity); void checkEntityTypeExists(String typeId); void checkIsNotSystem(String typeId); static final String ENTITY_PREFIX; static final String PLUGIN; static final String SYS_PLUGIN; }