Skip to content

Commit bce49f9

Browse files
committed
Adding new test pushing only loads
Adding test for the case highlighted in the issue that was the one used to find the problem being fixed in the PR
1 parent 0032e67 commit bce49f9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.ci/code/BHoM_Adapter_Tests/PushTests.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,27 @@ public void DependencyOrder_UpdateAndFullPush()
194194
"For Node objects, UpdateOnly should have come before FullPush.");
195195
}
196196

197+
[Test]
198+
public void DependencyOrder_CreateLoadNoObjectsWithIds()
199+
{
200+
List<BarUniformlyDistributedLoad> loads = Create.RandomObjects<BarUniformlyDistributedLoad>(3);
201+
202+
sa.Push(loads);
203+
204+
string correctOrder = "BH.oM.Structure.MaterialFragments.IMaterialFragment, " +
205+
"BH.oM.Structure.Constraints.Constraint6DOF, " +
206+
"BH.oM.Structure.SectionProperties.ISectionProperty, " +
207+
"BH.oM.Structure.Elements.Node, " +
208+
"BH.oM.Structure.Constraints.BarRelease, " +
209+
"BH.oM.Structure.Offsets.Offset, " +
210+
"BH.oM.Structure.Elements.Bar, " +
211+
"BH.oM.Structure.Loads.Loadcase, " +
212+
"BH.oM.Structure.Loads.BarUniformlyDistributedLoad";
213+
string createdOrder = string.Join(", ", sa.Created.Select(c => c.Item1.FullName));
214+
215+
Assert.AreEqual(correctOrder, createdOrder);
216+
}
217+
197218
[Test]
198219
public void DependencyOrder_CreateLoadAllObjectsWithIds()
199220
{

0 commit comments

Comments
 (0)