using System; using Chernobyl.Mathematics.Movement; using NUnit.Framework; namespace Chernobyl.Mathematics.Geometry { [TestFixture, Description("Tests for the LineSegment type.")] public class LineSegmentImplementationTests : LineSegmentTests { //----------------------------------------------------------------- // Constructor Tests //----------------------------------------------------------------- [Test, Description("A test to ensure that LineSegment(ITransform, ITransform) " + "throws an ArgumentNullException if the first argument is null.")] public void ConstructorFirstArgumentNullExceptionTest() { Assert.Throws(() => CreateLineSegment(null, new MatrixTransform())); } [Test, Description("A test to ensure that LineSegment(ITransform, ITransform) " + "throws an ArgumentNullException if the second argument is null.")] public void ConstructorSecondArgumentNullExceptionTest() { Assert.Throws(() => CreateLineSegment(new MatrixTransform(), null)); } protected override ILineSegment CreateLineSegment(ITransform point1, ITransform point2) { return new LineSegment(point1, point2); } } }