Skip to content

Commit

Permalink
test(OldOsmFile_Test): fix with the new GetOrNewModel()
Browse files Browse the repository at this point in the history
  • Loading branch information
MingboPeng committed Jun 13, 2023
1 parent fc39a4b commit efedaaa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Ironbug.HVAC_Tests/Loop/IB_ThermalZone_Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ public void OpenStudioDll_Test()
public void OldOsmFile_Test()
{
var oldFile = System.IO.Path.Combine(TestHelper.TestSourceFolder, "OldVersion.osm");
var ex = Assert.Throws<ArgumentException>(() => IB_HVACSystem.GetOrNewModel(oldFile));

Assert.IsTrue(ex.Message.StartsWith("Incompatible input OpenStudio file version"));
var oldModel = IB_HVACSystem.GetOrNewModel(oldFile);
var version = oldModel.version().str(); // updated to the current version

//var ex = Assert.Throws<ArgumentException>(() => IB_HVACSystem.GetOrNewModel(oldFile));
//Assert.IsTrue(ex.Message.StartsWith("Incompatible input OpenStudio file version"));
Assert.IsTrue(!version.StartsWith("2.4"));
}


Expand Down

0 comments on commit efedaaa

Please sign in to comment.