Skip to content

Commit b1f902b

Browse files
committed
Fixes #34
1 parent 1fda66a commit b1f902b

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

ids-lib/IfcSchema/SchemaInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ public static IEnumerable<string> GetConcreteClassesFrom(string topClass, IfcSch
552552
{
553553
if (schemaVersions.IsSingleSchema())
554554
{
555-
var schema = GetSchemas(IfcSchemaVersions.IfcAllVersions).First();
555+
var schema = GetSchemas(schemaVersions).First();
556556
if (schema is null)
557557
return Enumerable.Empty<string>();
558558
var top = schema[topClass];
@@ -561,7 +561,7 @@ public static IEnumerable<string> GetConcreteClassesFrom(string topClass, IfcSch
561561
return top.MatchingConcreteClasses.Select(x=>x.Name);
562562
}
563563

564-
var schemas = GetSchemas(IfcSchemaVersions.IfcAllVersions);
564+
var schemas = GetSchemas(schemaVersions);
565565
List<string> ret = new();
566566
foreach (var schema in schemas)
567567
{

ids-lib/LibraryInformation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ public static class LibraryInformation
2626
/// <summary>
2727
/// Static field with hardcoded DLL version number.
2828
/// </summary>
29-
public static string AssemblyVersion => "1.0.76";
29+
public static string AssemblyVersion => "1.0.77";
3030
}

ids-lib/ids-lib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageReleaseNotes>First implementation.</PackageReleaseNotes>
2121
<PackageReadmeFile>README.md</PackageReadmeFile>
2222
<!-- Github actions are setup so that when this version is bumped the nuget package is uploaded -->
23-
<AssemblyVersion>1.0.76</AssemblyVersion>
23+
<AssemblyVersion>1.0.77</AssemblyVersion>
2424
<FileVersion>$(AssemblyVersion)</FileVersion>
2525
<Version>$(AssemblyVersion)</Version>
2626
<GenerateDocumentationFile>true</GenerateDocumentationFile>

ids-tool.tests/IfcSchemaTests.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,20 @@ public void CanGetConcreteSubclasses()
105105
topClass.Should().NotBeNull();
106106
topClass.Should().Be("IfcBuildingElement");
107107

108-
//
109-
108+
// check that the passed schema is used
109+
var wind = SchemaInfo.GetConcreteClassesFrom("IfcWindow", IfcSchemaVersions.Ifc4).Select(x => x.ToUpperInvariant()).ToList();
110+
wind.Count().Should().Be(2);
111+
wind = SchemaInfo.GetConcreteClassesFrom("IfcWindow", IfcSchemaVersions.Ifc2x3).Select(x => x.ToUpperInvariant()).ToList();
112+
wind.Count().Should().Be(1);
113+
wind = SchemaInfo.GetConcreteClassesFrom("IfcWindow", IfcSchemaVersions.Ifc4x3).Select(x => x.ToUpperInvariant()).ToList();
114+
wind.Count().Should().Be(1);
115+
116+
var elements2x3 = SchemaInfo.GetConcreteClassesFrom("IfcBuiltElement", IfcSchemaVersions.Ifc2x3).Select(x => x.ToUpperInvariant()).ToList();
117+
elements2x3.Should().HaveCount(0);
118+
var elements4x3 = SchemaInfo.GetConcreteClassesFrom("IfcBuiltElement", IfcSchemaVersions.Ifc4x3).Select(x => x.ToUpperInvariant()).ToList();
119+
elements4x3.Should().HaveCount(36);
120+
121+
110122
}
111123

112124
[Theory]

ids-tool/ids-tool.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageIcon>icon.png</PackageIcon>
1717
<PackageTags>IDS, buildingSmart</PackageTags>
1818
<!-- Github actions are setup so that when this version is bumped the nuget package is uploaded -->
19-
<AssemblyVersion>1.0.76</AssemblyVersion>
19+
<AssemblyVersion>1.0.77</AssemblyVersion>
2020
<FileVersion>$(AssemblyVersion)</FileVersion>
2121
<Version>$(AssemblyVersion)</Version>
2222
<RepositoryUrl>https://github.com/buildingSMART/IDS-Audit-tool.git</RepositoryUrl>

0 commit comments

Comments
 (0)