public void LineSegment_ConstructorVector_ShouldCreateLineSegmentFromVector() { LineSegment lineSegment = new LineSegment(new Vector(Point.MakePointWithInches(1, 1, 1))); lineSegment.Should().Be(new LineSegment(Point.Origin, Point.MakePointWithInches(1, 1, 1))); }
public void LineSegment_ConstructorPoint_ShouldCreateLineSegmentThroughOrigin() { LineSegment lineSegment = new LineSegment(Point.MakePointWithInches(1, 1, 1)); lineSegment.Should().Be(new LineSegment(Point.Origin, Point.MakePointWithInches(1, 1, 1))); }
public void LineSegment_Reverse_ShouldReturnReversedLineSegment() { LineSegment lineSegment = new LineSegment(Point.MakePointWithInches(1, 1, 1)); lineSegment.Should().Be(new LineSegment(Point.MakePointWithInches(1, 1, 1), Point.MakePointWithInches(0, 0, 0))); }
public void LineSegment_ConstructorLineSegment_ShouldCreateCopy() { LineSegment lineSegment1 = new LineSegment(Point.MakePointWithInches(1, 1, 1)); LineSegment lineSegment2 = new LineSegment(lineSegment1); lineSegment2.Should().NotBeSameAs(lineSegment1); lineSegment2.Should().Be(lineSegment1); }
public void LineSegment_ConstructorPointDirectionDistance_ShouldCreateLineSegmentFromOrigin_IfPointIsNull() { Point point = null; Direction direction = new Direction(1, 0, 0); Distance distance = new Distance(1, Distance.Inches); LineSegment lineSegment = new LineSegment(point, direction, distance); lineSegment.Should().Be(new LineSegment(Point.MakePointWithInches(1, 0, 0))); }
public void LineSegment_ConstructorPointDirectionDistance_ShouldCreateLineSegmentFromPointDirectionAndDistance() { Direction direction = new Direction(1, 0, 0); Distance distance = new Distance(1, Distance.Inches); LineSegment lineSegment = new LineSegment(Point.Origin, direction, distance); lineSegment.Should().Be(new LineSegment(Point.MakePointWithInches(1, 0, 0))); }
public void LineSegment_ConstructorPointVector_ShouldCreateLineSegmentFromOrigin_IfPointIsNull() { Point point = null; Vector vector = new Vector(Point.MakePointWithInches(1, 1, 1)); LineSegment lineSegment = new LineSegment(point, vector); lineSegment.Should().Be(new LineSegment(vector)); }
public void LineSegment_ConstructorPointVector_ShouldCreateLineSegmentFromPointAndVector() { Vector vector = new Vector(Point.MakePointWithInches(1, 1, 1)); LineSegment lineSegment = new LineSegment(Point.Origin, vector); lineSegment.Should().Be(new LineSegment(Point.MakePointWithInches(1, 1, 1))); }