Files
speckle-sharp-sdk/tests/Speckle.Objects.Tests.Unit/Utils/ShallowCopyTests.cs
T
Jedd Morgan 06ef3e67e2 chore(deps): Correctly pin versions that need to be pinned and bump those that don't (#461)
* Correctly pin versions that need to be pinned and bump those that don't

* .NET logging alignment

* Fix test project dependencies

* recommended verify settings

* don't ask me why it needs this to work
2026-04-15 15:37:43 +01:00

49 lines
1.0 KiB
C#

using System.Collections;
using AwesomeAssertions;
using Speckle.Objects.Data;
using Speckle.Objects.Geometry;
using Speckle.Sdk.Common;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.Tests.Unit.Utils;
public class ShallowCopyTests
{
public ShallowCopyTests()
{
TypeLoader.Reset();
TypeLoader.Initialize(typeof(Base).Assembly, typeof(Point).Assembly);
}
[Fact]
public void CanShallowCopy_Wall()
{
const string UNITS = Units.Meters;
var ds = new DataObject()
{
name = "directShape",
displayValue = new List<Base>
{
new Mesh
{
vertices = new(),
faces = new(),
units = UNITS,
},
new Mesh
{
vertices = new(),
faces = new(),
units = UNITS,
},
},
properties = new Dictionary<string, object?>(),
};
var shallow = ds.ShallowCopy();
var displayValue = (IList)shallow["displayValue"].NotNull();
ds.displayValue.Count.Should().Be(displayValue.Count);
}
}