Files
speckle-sharp-sdk/tests/Speckle.Objects.Tests.Unit/Serialization/ObjectsTestData.cs
T
Jedd Morgan 93d517eab7 test(objects): Verify tests for serialization (#227)
* Objects Verify Tests

* VerifyTests

* Verify as array with deterministic order

* lock

* Updated verified
2025-03-12 08:29:30 +00:00

47 lines
1.1 KiB
C#

using Speckle.Objects.Geometry;
using Speckle.Sdk.Common;
using Speckle.Sdk.Models;
using Point = Speckle.Objects.Geometry.Point;
namespace Speckle.Objects.SerializationTests;
public static class ObjectsTestData
{
/// <summary>
/// Data set of simple valid Speckle Objects
/// Right now, we should have exactly one for each non-abstract object model.
/// </summary>
/// <returns></returns>
private static IEnumerable<Base> Data()
{
yield return new Mesh()
{
vertices = [0d, 0d, 0d, 1d, 0d, 0d, 1d, 1d, 0d],
faces = [3, 0, 1, 2],
applicationId = "asdfasdf",
units = Units.Meters,
area = 42,
volume = 420,
colors = [-10185235, -10185235, -10185235],
};
yield return new Point()
{
x = 123.123,
y = 111.222,
z = -0.001,
applicationId = "iosdf;juasdfioj",
units = Units.Feet,
};
yield return new Vector()
{
x = 321.321,
y = 222.111,
z = -1.001,
applicationId = "iosdf;juasdfioj",
units = Units.Inches,
};
}
public static TheoryData<Base> TheoryData => new(Data());
}