From d3fbb2853444de84dc1331c2ddcee0349c1dc56d Mon Sep 17 00:00:00 2001 From: Andy Ward Date: Mon, 16 Dec 2024 15:32:42 +0000 Subject: [PATCH] Updated test dependencies Fixed up brittle test: GeometryPersistencyTables.CanUpgradeDbStructure() was affected FileVersionIsCorrect test using same xbim file. --- Tests/GeometryPersistencyTables.cs | 9 +++++++-- Tests/Xbim.Essentials.Tests.csproj | 18 +++++++++--------- .../Xbim.Essentials.NetCore.Tests.csproj | 8 ++++---- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Tests/GeometryPersistencyTables.cs b/Tests/GeometryPersistencyTables.cs index dcaf4b59a..267281dcd 100644 --- a/Tests/GeometryPersistencyTables.cs +++ b/Tests/GeometryPersistencyTables.cs @@ -1,4 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.IO; using Xbim.Ifc; using Xbim.Ifc4; using Xbim.IO; @@ -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(); @@ -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; diff --git a/Tests/Xbim.Essentials.Tests.csproj b/Tests/Xbim.Essentials.Tests.csproj index 708abdc3b..d79680147 100644 --- a/Tests/Xbim.Essentials.Tests.csproj +++ b/Tests/Xbim.Essentials.Tests.csproj @@ -32,15 +32,15 @@ - - - - - - - - - + + + + + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/Xbim.Essentials.NetCore.Tests/Xbim.Essentials.NetCore.Tests.csproj b/Xbim.Essentials.NetCore.Tests/Xbim.Essentials.NetCore.Tests.csproj index 132b54c56..f3d57ea1f 100644 --- a/Xbim.Essentials.NetCore.Tests/Xbim.Essentials.NetCore.Tests.csproj +++ b/Xbim.Essentials.NetCore.Tests/Xbim.Essentials.NetCore.Tests.csproj @@ -9,10 +9,10 @@ - - - - + + + +