8a148b892f
* removes unused classes and gh schema constructors * additional cleanup of backwards compatibility (v2) * Update Arc.cs * updates unit tests * re-adds bbox to box * updates tests * pr fixes for backwards compatibility * Uses a new objects test in Revit for serialization tests * format * updates revit model curve class to inherit from curve geometry, and adds deprecated v2 classes * fixes transform unit tests * fixes deprecated speckle type * removes unnecessary new revit curve classes --------- Co-authored-by: Adam Hathcock <adam@hathcock.uk> Co-authored-by: Alan Rynne <alan@rynne.es>
48 lines
1.0 KiB
C#
48 lines
1.0 KiB
C#
using System.Collections;
|
|
using NUnit.Framework;
|
|
using Speckle.Objects.BuiltElements;
|
|
using Speckle.Objects.Geometry;
|
|
using Speckle.Sdk.Common;
|
|
|
|
namespace Speckle.Objects.Tests.Unit.Utils;
|
|
|
|
[TestFixture]
|
|
public class ShallowCopyTests
|
|
{
|
|
[Test]
|
|
public void CanShallowCopy_Wall()
|
|
{
|
|
const string UNITS = Units.Meters;
|
|
var wall = new Wall()
|
|
{
|
|
height = 5,
|
|
baseLine = new Line()
|
|
{
|
|
start = new Point(0, 0, 0, UNITS),
|
|
end = new Point(3, 0, 0, UNITS),
|
|
units = UNITS,
|
|
},
|
|
units = UNITS,
|
|
displayValue = new List<Mesh>
|
|
{
|
|
new Mesh
|
|
{
|
|
vertices = new(),
|
|
faces = new(),
|
|
units = UNITS,
|
|
},
|
|
new Mesh
|
|
{
|
|
vertices = new(),
|
|
faces = new(),
|
|
units = UNITS,
|
|
},
|
|
},
|
|
};
|
|
|
|
var shallow = wall.ShallowCopy();
|
|
var displayValue = (IList)shallow["displayValue"].NotNull();
|
|
Assert.That(wall.displayValue, Has.Count.EqualTo(displayValue.Count));
|
|
}
|
|
}
|