Skip to content

Commit

Permalink
Updated test dependencies
Browse files Browse the repository at this point in the history
Fixed up brittle test: GeometryPersistencyTables.CanUpgradeDbStructure() was affected FileVersionIsCorrect test using same xbim file.
  • Loading branch information
andyward committed Dec 16, 2024
1 parent e273446 commit d3fbb28
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
9 changes: 7 additions & 2 deletions Tests/GeometryPersistencyTables.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using Xbim.Ifc;
using Xbim.Ifc4;
using Xbim.IO;
Expand All @@ -13,9 +14,13 @@ public class GeometryPersistencyTables
[TestMethod]
public void CanUpgradeDbStucture()
{
var sourceFile = @"GeometryCacheTestFiles\Monolith_v10.xBIM";
var targetFile = @"GeometryCacheTestFiles\Monolith_v10_WIP.xBIM";

File.Copy(sourceFile, targetFile, overwrite:true);
using (var m = new EsentModel(new EntityFactoryIfc4()))
{
m.Open(@"GeometryCacheTestFiles\Monolith_v10.xBIM", XbimDBAccess.Exclusive);
m.Open(targetFile, XbimDBAccess.Exclusive);
Assert.AreEqual(1, m.GeometrySupportLevel, "GeometrySupportLevel for Monolith_v10 should be 1");

var updated = m.EnsureGeometryTables();
Expand All @@ -28,7 +33,7 @@ public void CanUpgradeDbStucture()
m.Close();
}

using (var store = IfcStore.Open(@"GeometryCacheTestFiles\Monolith_v10.xBIM"))
using (var store = IfcStore.Open(targetFile))
{
var geometryStore = store.GeometryStore;

Expand Down
18 changes: 9 additions & 9 deletions Tests/Xbim.Essentials.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit d3fbb28

Please sign in to comment.