using Autodesk.Navisworks.Api;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace NavisworksTransport.UnitTests.CoordinateSystem
{
    [TestClass]
    public class PathPointVisualizationTests
    {
        [TestMethod]
        public void ResolveVisualizationRadius_WhenVisualizationDiameterIsUnset_ShouldUseDefaultRadius()
        {
            var point = new PathPoint(new Point3D(1.0, 2.0, 3.0), "测试点", PathPointType.WayPoint);

            double radius = point.ResolveVisualizationRadius(0.25);

            Assert.AreEqual(0.25, radius, 1e-9);
        }

        [TestMethod]
        public void ResolveVisualizationRadius_WhenVisualizationDiameterIsSpecified_ShouldUseHalfDiameter()
        {
            var point = new PathPoint(new Point3D(1.0, 2.0, 3.0), "测试点", PathPointType.WayPoint)
            {
                VisualizationDiameter = 0.10
            };

            double radius = point.ResolveVisualizationRadius(0.25);

            Assert.AreEqual(0.05, radius, 1e-9);
        }
    }
}
