Files
speckle-sharp-sdk/tests/Speckle.Objects.Tests.Unit/Geometry/ArcTests.cs
T
Adam Hathcock 6f5f044095 Adam/cxpla 6 kill remaining kit code in core (#59)
* compiles with relevant deletions

* Test fixes

* fix type loading

* type load for tests

* speckle objects renamespace

* rename Core to Sdk

* Fix test references

* tests renaming

* rename logging

* fmt

* start of adding an attribute to all base types

* convert all types and do basic test

* Fix most tests

* fix more tests

* fmt

* Build fix

* add changes and more tests

* Fix tests

* Fix integration tests
2024-08-08 10:52:19 +01:00

24 lines
715 B
C#

using System;
using NUnit.Framework;
using Speckle.Objects.Geometry;
namespace Objects.Tests.Unit.Geometry;
[TestFixture, TestOf(typeof(Arc))]
public class ArcTests
{
private Plane TestPlane => new(new Point(0, 0), new Vector(0, 0, 1), new Vector(1, 0, 0), new Vector(0, 1, 0));
[Test]
public void CanCreateArc_HalfCircle()
{
var arc = new Arc(TestPlane, new Point(-5, 5), new Point(5, 5), Math.PI);
Assert.That(arc.startAngle, Is.EqualTo(0));
Assert.That(arc.endAngle, Is.EqualTo(Math.PI));
Assert.That(Point.Distance(arc.midPoint, new Point(0, 0)), Is.EqualTo(0).Within(0.0001));
Assert.That(Point.Distance(arc.plane.origin, new Point(0, 5)), Is.EqualTo(0).Within(0.0001));
}
}