From 2ca4a2c65eeb4fd1b3df9e58cc6521fa1132193c Mon Sep 17 00:00:00 2001 From: Claudio Benghi Date: Fri, 29 Mar 2024 18:21:32 +0100 Subject: [PATCH] Tested and fixed proposed tests Minor fix in IDS script syntax and adjusted script: - minor title fix - removed redundant "requirements:" lines --- ...ited_specifications_fails_if_the_applicability_matches.ids | 4 ++-- Documentation/testcases/scripts.md | 4 +--- SchemaProject/DocAutomation/IdsScript.cs | 2 +- SchemaProject/program.cs | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Documentation/testcases/ids/fail-prohibited_specifications_fails_if_the_applicability_matches.ids b/Documentation/testcases/ids/fail-prohibited_specifications_fails_if_the_applicability_matches.ids index 071a087..e3cff78 100644 --- a/Documentation/testcases/ids/fail-prohibited_specifications_fails_if_the_applicability_matches.ids +++ b/Documentation/testcases/ids/fail-prohibited_specifications_fails_if_the_applicability_matches.ids @@ -1,11 +1,11 @@ - Prohibited specifications fails if applicability matches + Prohibited specifications fails if the applicability matches Generated via code automation in the Ids Repository on github. - + diff --git a/Documentation/testcases/scripts.md b/Documentation/testcases/scripts.md index c1a8648..db1c744 100644 --- a/Documentation/testcases/scripts.md +++ b/Documentation/testcases/scripts.md @@ -1148,11 +1148,10 @@ Attribute: ''Name'',''Waldo'' ### Prohibited specifications fails if the applicability matches ``` ids ids/fail-prohibited_specifications_fails_if_the_applicability_matches.ids -Prohibited specifications fails if applicability matches +Prohibited specifications fails if the applicability matches Prohibited IFC2X3 Entity: ''IFCWALL'' -Requirements: ``` ### Prohibited specifications passes if the applicability does not matches @@ -1162,7 +1161,6 @@ Prohibited specifications passes if the applicability does not matches Prohibited IFC2X3 Entity: ''IFCWINDOW'' -Requirements: ``` ### Required specifications need at least one applicable entity (1/2) diff --git a/SchemaProject/DocAutomation/IdsScript.cs b/SchemaProject/DocAutomation/IdsScript.cs index ddbc460..7634728 100644 --- a/SchemaProject/DocAutomation/IdsScript.cs +++ b/SchemaProject/DocAutomation/IdsScript.cs @@ -559,7 +559,7 @@ internal void WriteTo(TextWriter writer) { writer.WriteLine(item); } - if (RequirementFacetStrings != null) + if (RequirementFacetStrings != null && RequirementFacetStrings.Any()) { writer.WriteLine("Requirements:"); foreach (var item in RequirementFacetStrings) diff --git a/SchemaProject/program.cs b/SchemaProject/program.cs index 3f9428a..e7f21be 100644 --- a/SchemaProject/program.cs +++ b/SchemaProject/program.cs @@ -124,8 +124,8 @@ private static void RegenIDS() var invalidFileName = item.FullName.Replace("fail-", "invalid-"); if (missingIfcFileNames.Contains(invalidFileName)) { + Console.WriteLine("Suitable matching invalid IFC is found, it has been renamed."); File.Move(item.FullName, invalidFileName); - // Console.WriteLine("A matching invalid IFC is required, should you rename this?"); } //else if (allIfcFound) //{