Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property Test Cases #215

Closed
Minna26 opened this issue Oct 27, 2023 · 2 comments
Closed

Property Test Cases #215

Minna26 opened this issue Oct 27, 2023 · 2 comments

Comments

@Minna26
Copy link

Minna26 commented Oct 27, 2023

Hello,

Just a question about two rules in property test cases 😉.

  1. The All matching property sets must satisfy requirements 3/3 is marked as PASS, I believe the maxOccurs = 1 is violated because both property sets will pass the restriction "Foo_.*" and so the occurrence number is 2. Is this a correct assumption or am I wrong?

  2. The Properties can be overridden by an occurrence 1/2 is also marked as PASS. I have an issue with the Pset linked to the IFCWALLTYPE, because it does not have the defined value. It seems like I should ignore this Pset, but if so can someone tell me when to take the Pset from IFCWALLTYPE into consideration and when not? Because right above this rule is a rule that the "Properties can be inherited from the type". Also, there are rules "All matching property sets must satisfy requirements" and "All matching properties must satisfy requirements" so I believe the value in the second Pset should be checked and evaluated as incorrect.

Can anyone please advise me on this?

If you need some more explanation of my confusion, please let me know.

Thank you in advance.

@andyward
Copy link
Contributor

HI Michal

My current understanding is that:

  1. The maxOccurs =1 is incorrect on all the test cases. @CBenghi is getting this fixed as part of Regenerate test cases #192 I believe

These more complex cardinalities (such as "There should be 2 occurrences") are excluded from current v1 IDS. It's just Required, Prohibited and Optional. In fact there's a late change to make this much more explicit on Requirements (See #203)

I believe This table represents the mapping of valid min-maxOccurs and their mapping, which you could use in the interim.

  1. The intent is you check the instance/occurrence meets the requirement first. If it doesn't, then you fall back to check the requirement is met by any type that defines the instance. i.e. check the WallType from the Wall

In this case the check for Foo_Bar.Foo = "Bar" is satisfied by the Wall instance and the value on the WallType never needs to be checked. The prior test Properties can be inherited from the type 2/2 checks the alternate case when the type satisfies the requirement for the instance.

The 'All matching property [sets]...' tests are testing a the pattern constraint on properties, and in particular what happens when multiple properties meet some/all of the requirements (i.e. multiple property Sets matching 'Foo_.*' . That's a different feature being tested to overriding - when overriding a property from the type it's only a single property regardless of where it came from.

Hope that helps

@Minna26
Copy link
Author

Minna26 commented Oct 27, 2023

Thank you Andy, this helped a lot.

@Minna26 Minna26 closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants