Skip to content

Commit

Permalink
Updated property sets.
Browse files Browse the repository at this point in the history
Added test for issue #25
  • Loading branch information
CBenghi committed Mar 6, 2024
1 parent 6903f38 commit 4df7222
Show file tree
Hide file tree
Showing 16 changed files with 218 additions and 173 deletions.
4 changes: 2 additions & 2 deletions ids-lib.codegen/ids-lib.codegen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0-1.final" />
<PackageReference Include="Xbim.Essentials" Version="6.0.443-develop" />
<PackageReference Include="Xbim.Properties" Version="6.0.10" />
<PackageReference Include="Xbim.Essentials" Version="6.0.445" />
<PackageReference Include="Xbim.Properties" Version="6.0.11" />
<PackageReference Include="XmlDocMarkdown.Core" Version="2.9.0" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion ids-lib/IfcSchema/SchemaInfo.Attributes.g.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated code via ids-lib.codegen using Xbim.Essentials 6.0.0.443 - any changes made directly here will be lost
// generated code via ids-lib.codegen using Xbim.Essentials 6.0.445.0 - any changes made directly here will be lost

using System;

Expand Down
2 changes: 1 addition & 1 deletion ids-lib/IfcSchema/SchemaInfo.ClassAndAttributeNames.g.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated/>
// This code was automatically generated with information from Xbim.Essentials 6.0.0.443.
// This code was automatically generated with information from Xbim.Essentials 6.0.445.0.
// Any changes made to this file will be lost.

using System;
Expand Down
2 changes: 1 addition & 1 deletion ids-lib/IfcSchema/SchemaInfo.MeasureNames.g.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated/>
// This code was automatically generated with information from Xbim.Essentials 6.0.0.443.
// This code was automatically generated with information from Xbim.Essentials 6.0.445.0.
// Any changes made to this file will be lost.

using System;
Expand Down
2 changes: 1 addition & 1 deletion ids-lib/IfcSchema/SchemaInfo.ObjectTypes.g.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// programmatically generated from ids-lib.codegen using Xbim 6.0.0.443
// programmatically generated from ids-lib.codegen using Xbim 6.0.445.0
using System.Collections.Generic;

namespace IdsLib.IfcSchema;
Expand Down
2 changes: 1 addition & 1 deletion ids-lib/IfcSchema/SchemaInfo.PartOfRelations.g.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated/>
// This code was automatically generated with information from Xbim.Essentials 6.0.0.443.
// This code was automatically generated with information from Xbim.Essentials 6.0.445.0.
// Any changes made to this file will be lost.

using System;
Expand Down
317 changes: 161 additions & 156 deletions ids-lib/IfcSchema/SchemaInfo.Properties.g.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ids-lib/IfcSchema/SchemaInfo.Schemas.g.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated code via ids-lib.codegen using Xbim.Essentials 6.0.0.443, any changes to this file will be lost at next regeneration
// generated code via ids-lib.codegen using Xbim.Essentials 6.0.445.0, any changes to this file will be lost at next regeneration

using System.Linq;

Expand Down
2 changes: 1 addition & 1 deletion ids-lib/LibraryInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public static class LibraryInformation
/// <summary>
/// Static field with hardcoded DLL version number.
/// </summary>
public static string AssemblyVersion => "1.0.64";
public static string AssemblyVersion => "1.0.65";
}
2 changes: 1 addition & 1 deletion ids-lib/ids-lib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReleaseNotes>First implementation.</PackageReleaseNotes>
<PackageReadmeFile>README.md</PackageReadmeFile>
<!-- Github actions are setup so that when this version is bumped the nuget package is uploaded -->
<AssemblyVersion>1.0.64</AssemblyVersion>
<AssemblyVersion>1.0.65</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Version>$(AssemblyVersion)</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
1 change: 1 addition & 0 deletions ids-tool.tests/IdsSchemaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public async void BuildingSmartWebServerShouldReturnSchemaCorrectly(string url)

var c = new HttpClient();
var t = await c.GetAsync(url);

var tp = t.Content.Headers.ContentType;
Skip.If(tp is null, "contentype is null");
Skip.If(!acceptable.Contains(tp.ToString()), $"contentype is `{tp}` is not in the acceptable range.");
Expand Down
3 changes: 2 additions & 1 deletion ids-tool.tests/IfcPredefinedPropertiesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public void IfcPropertyNameCoherenceAcrossSchemas()
unexpectedMeasureTypes++;
}
}
unexpectedMeasureTypes.Should().Be(516, "these are the acknowledged variations");
var expectedCount = 526;
unexpectedMeasureTypes.Should().Be(expectedCount, $"{expectedCount} is the count of acknowledged variations");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<ids:ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns:ids="http://standards.buildingsmart.org/IDS">
<!--edited with usBIM.IDSeditor (http://www.accasoftware.com)-->
<ids:info>
<ids:title>PilotTest</ids:title>
</ids:info>
<ids:specifications>
<ids:specification ifcVersion="IFC4X3" name="Specification IfcPile">
<ids:applicability maxOccurs="unbounded">
<ids:entity>
<ids:name>
<ids:simpleValue>IFCPILE</ids:simpleValue>
</ids:name>
</ids:entity>
</ids:applicability>
<ids:requirements>
<ids:property dataType="IFCLABEL" instructions="The model number and/or unit designator assigned by the manufacturer of the manufactured item.">
<ids:propertySet>
<ids:simpleValue>Pset_ConstructionOccurence</ids:simpleValue>
</ids:propertySet>
<ids:baseName>
<ids:simpleValue>ModelNumber</ids:simpleValue>
</ids:baseName>
<ids:value>
<xs:restriction base="xs:string">
<xs:pattern value="PIL-\d{3}" />
</xs:restriction>
</ids:value>
</ids:property>
</ids:requirements>
</ids:specification>
</ids:specifications>
</ids:ids>
7 changes: 7 additions & 0 deletions ids-tool.tests/IssueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,12 @@ public void Issue11_IfcLogicalIsValidDatatype()
var f = new FileInfo("IssueFiles/Issue 11 - IfcLogical.ids");
LoggerAndAuditHelpers.FullAudit(f, XunitOutputHelper, IdsLib.Audit.Status.Ok);
}

[Fact]
public void Issue11_IfcPropertySetFound()
{
var f = new FileInfo("IssueFiles/Issue 25 - Pset_ConstructionOccurence.ids");
LoggerAndAuditHelpers.FullAudit(f, XunitOutputHelper, IdsLib.Audit.Status.Ok);
}
}
}
9 changes: 4 additions & 5 deletions ids-tool.tests/ids-tool.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.4.2" />
Expand Down Expand Up @@ -171,6 +171,9 @@
<None Update="IssueFiles\Issue 09 - XML structure.ids">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="IssueFiles\Issue 25 - Pset_ConstructionOccurence.ids">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="ValidFiles\entities_enumeration.ids">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand All @@ -188,10 +191,6 @@
</None>
</ItemGroup>

<ItemGroup>
<Folder Include="IssueFiles\IDS Repo\" />
</ItemGroup>



</Project>
2 changes: 1 addition & 1 deletion ids-tool/ids-tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageIcon>icon.png</PackageIcon>
<PackageTags>IDS, buildingSmart</PackageTags>
<!-- Github actions are setup so that when this version is bumped the nuget package is uploaded -->
<AssemblyVersion>1.0.64</AssemblyVersion>
<AssemblyVersion>1.0.65</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Version>$(AssemblyVersion)</Version>
<RepositoryUrl>https://github.com/buildingSMART/IDS-Audit-tool.git</RepositoryUrl>
Expand Down

0 comments on commit 4df7222

Please sign in to comment.