Skip to content

Commit

Permalink
Improve some error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-ifak committed Nov 3, 2024
1 parent eea0c01 commit 2416dae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aas_test_engines/test_cases/v3_0/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,11 @@ class BasicEventElement(EventElement):

def check_observed(self):
if self.observed.type != ReferenceType.ModelReference:
raise CheckConstraintException("observed must be a model reference")
raise CheckConstraintException("Property 'observed' must be a model reference")

def check_message_broker(self):
if self.message_broker and self.message_broker.type != ReferenceType.ModelReference:
raise CheckConstraintException("observed must be a model reference")
raise CheckConstraintException("Property 'observed' must be a model reference")

# 5.3.7.4 Blob

Expand Down Expand Up @@ -788,10 +788,10 @@ def check_aasd_014(self):
"""
if self.entity_type == EntityType.SelfManagedEntity:
if self.global_asset_id is None and self.specific_asset_ids is None:
raise CheckConstraintException("Constraint AASd-014 violated: entity is self-manged by neither globalAssetId nor specificAssetId are set")
raise CheckConstraintException("Constraint AASd-014 violated: entity is self-manged but neither globalAssetId nor specificAssetId are set")
else:
if self.global_asset_id or self.specific_asset_ids:
raise CheckConstraintException("Constraint AASd-014 violated: entity is co-manged by either globalAssetId or specificAssetId are set")
raise CheckConstraintException("Constraint AASd-014 violated: entity is co-manged but either globalAssetId or specificAssetId are set")

def check_aad_117(self):
ensure_have_id_shorts(self.statements)
Expand Down

0 comments on commit 2416dae

Please sign in to comment.