Skip to content

Commit a8121d1

Browse files
committed
Add Analytical and Spatial_Engine as references, and ensure Anlytical_Engine is properly loaded
1 parent 1d0c898 commit a8121d1

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.ci/unit-tests/Robot_Adapter_Tests/PullTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
using System;
3737
using Shouldly;
3838
using BH.oM.Adapter.Commands;
39+
using System.Reflection;
3940

4041
namespace BH.Tests.Adapter.Robot
4142
{
@@ -51,6 +52,8 @@ public void OneTimeSetup()
5152
splitPath = splitPath.Take(splitPath.IndexOf(".ci") + 2).ToList();
5253
string modelPath = Path.Join(string.Join("\\", splitPath), "Models", "Simple 2-story structure with results.rtd");
5354
m_Adapter = new RobotAdapter(modelPath, null, true);
55+
//Forces Analytical_Engine to be loaded up. This is due to some parts of the call-chain not hard wired. This ensures that methods from Analytical_Engine are loaded and usable from RunExtensionMethod
56+
Assembly.Load("Analytical_Engine");
5457
}
5558

5659
[SetUp]

.ci/unit-tests/Robot_Adapter_Tests/PushTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public class PushTests
4949
public void OntimeSetup()
5050
{
5151
m_Adapter = new RobotAdapter("", null, true);
52+
//Forces Analytical_Engine to be loaded up. This is due to some parts of the call-chain not hard wired. THis ensures that methods from Analytical_Engine are loaded and usable from RunExtensionMethod
53+
Assembly.Load("Analytical_Engine");
5254
}
5355

5456
[SetUp]
@@ -237,7 +239,7 @@ public void PushPanelsWithTag()
237239
{
238240
Panel panel = Engine.Base.Create.RandomObject(typeof(Panel), i) as Panel;
239241
panel.Openings = new List<Opening>();
240-
panel.ExternalEdges = Create.Polyline(cornerPts.Select(x => x.Translate(Vector.ZAxis * i))).SubParts().Select(x => new Edge { Curve = x }).ToList();
242+
panel.ExternalEdges = Engine.Geometry.Create.Polyline(cornerPts.Select(x => x.Translate(Vector.ZAxis * i))).SubParts().Select(x => new Edge { Curve = x }).ToList();
241243
panels.Add(panel);
242244
}
243245

@@ -299,7 +301,7 @@ public void PushPanelsWithTagTwice()
299301
{
300302
Panel panel = Engine.Base.Create.RandomObject(typeof(Panel), i) as Panel;
301303
panel.Openings = new List<Opening>();
302-
panel.ExternalEdges = Create.Polyline(cornerPts.Select(x => x.Translate(Vector.ZAxis * i))).SubParts().Select(x => new Edge { Curve = x }).ToList();
304+
panel.ExternalEdges = Engine.Geometry.Create.Polyline(cornerPts.Select(x => x.Translate(Vector.ZAxis * i))).SubParts().Select(x => new Edge { Curve = x }).ToList();
303305
panels.Add(panel);
304306
}
305307

@@ -311,7 +313,7 @@ public void PushPanelsWithTagTwice()
311313
{
312314
Panel panel = Engine.Base.Create.RandomObject(typeof(Panel), (i + 1) * 7) as Panel;
313315
panel.Openings = new List<Opening>();
314-
panel.ExternalEdges = Create.Polyline(cornerPts.Select(x => x.Translate(Vector.ZAxis * i))).SubParts().Select(x => new Edge { Curve = x }).ToList();
316+
panel.ExternalEdges = Engine.Geometry.Create.Polyline(cornerPts.Select(x => x.Translate(Vector.ZAxis * i))).SubParts().Select(x => new Edge { Curve = x }).ToList();
315317
panels.Add(panel);
316318
}
317319

.ci/unit-tests/Robot_Adapter_Tests/Robot_Adapter_Tests.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
</ItemGroup>
2727

2828
<ItemGroup>
29-
<Reference Include="Adapter_Engine">
30-
<HintPath>C:\ProgramData\BHoM\Assemblies\Adapter_Engine.dll</HintPath>
31-
</Reference>
3229
<Reference Include="Adapter_oM">
3330
<HintPath>C:\ProgramData\BHoM\Assemblies\Adapter_oM.dll</HintPath>
3431
</Reference>
32+
<Reference Include="Analytical_Engine">
33+
<HintPath>C:\ProgramData\BHoM\Assemblies\Analytical_Engine.dll</HintPath>
34+
</Reference>
3535
<Reference Include="Analytical_oM">
3636
<HintPath>C:\ProgramData\BHoM\Assemblies\Analytical_oM.dll</HintPath>
3737
</Reference>
@@ -59,6 +59,9 @@
5959
<Reference Include="Physical_oM">
6060
<HintPath>C:\ProgramData\BHoM\Assemblies\Physical_oM.dll</HintPath>
6161
</Reference>
62+
<Reference Include="Spatial_Engine">
63+
<HintPath>C:\ProgramData\BHoM\Assemblies\Spatial_Engine.dll</HintPath>
64+
</Reference>
6265
<Reference Include="Spatial_oM">
6366
<HintPath>C:\ProgramData\BHoM\Assemblies\Spatial_oM.dll</HintPath>
6467
</Reference>

0 commit comments

Comments
 (0)