private rm21HorizontalAlignment setupHA1()
        {
            var funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(6925.6663, 6218.7689, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(6540.7903, 5615.8802, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(5952.2191, 6022.3138, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentOutsideSoluion;
             funGeomItem.deflectionSign = 1;
             var fGeomList = new List<IRM21fundamentalGeometry>();
             fGeomList.Add(funGeomItem);

             return new rm21HorizontalAlignment(
            fundamentalGeometryList: fGeomList,
            Name: null, stationEquationing: null);
        }
        private List<IRM21fundamentalGeometry> createFundmGeoms_arc1_butExternalSolution()
        {
            List<IRM21fundamentalGeometry> fundmtlGeoms = new List<IRM21fundamentalGeometry>();

             rm21MockFundamentalGeometry mockFG2 = new rm21MockFundamentalGeometry();

             List<ptsPoint> ptLst = new List<ptsPoint>();
             ptLst.Add(new ptsPoint(443.176112, 569.321807, 0.0));
             ptLst.Add(new ptsPoint(1211.097635, -23.605404, 0.0));
             ptLst.Add(new ptsPoint(1186.397526, 946.268836, 0.0));

             mockFG2.pointList = ptLst;

             mockFG2.expectedType = expectedType.ArcSegmentOutsideSoluion;
             mockFG2.deflectionSign = -1;

             fundmtlGeoms.Add(mockFG2);
             return fundmtlGeoms;
        }
        private List<IRM21fundamentalGeometry> createTestHA_fundGeom1()
        {
            // Code editors Note:  Items 4 and 5 are deliberately swapped.
             // Please do not change this.  The point of swapping them is to
             //    test the process of putting the items in the correct order.
             var returnList = new List<IRM21fundamentalGeometry>();
             var funGeomItem = new rm21MockFundamentalGeometry();

             // Line 1, Item 1
             funGeomItem.pointList.Add(new ptsPoint(3556.2226, 2526.6156, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(4932.6214, 4309.2396, 0.0));
             funGeomItem.expectedType = expectedType.LineSegment;
             returnList.Add(funGeomItem);

             // Arc 1, Item 2
             funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(4932.6214, 4309.2396, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(5700.5429, 3716.3124, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(5675.8428, 4686.1866, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentInsideSolution;
             funGeomItem.deflectionSign = 1;
             returnList.Add(funGeomItem);

             // Line 2, Item 3
             funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(5675.8428, 4686.1866, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(6624.6701, 4710.3507, 0.0));
             funGeomItem.expectedType = expectedType.LineSegment;
             returnList.Add(funGeomItem);

             // Line 3, Item 5
             funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(7738.3259, 5168.4199, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(9093.6332, 6443.7163, 0.0));
             funGeomItem.expectedType = expectedType.LineSegment;
             returnList.Add(funGeomItem);

             // Arc 2, Item 4
             funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(6624.6701, 4710.3507, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(6581.7001, 6397.6113, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(7738.3259, 5168.4199, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentInsideSolution;
             funGeomItem.deflectionSign = -1;
             returnList.Add(funGeomItem);

             return returnList;
        }
        public void HorizontalAlignment_singleArcHAOutsideSolutionRight_fromFundamentalGeometry_HAlengthIs2439()
        {
            var funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(7415.7202, 4384.7704, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(7458.9796, 3830.6151, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(6947.3437, 3613.3867, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentOutsideSoluion;
             funGeomItem.deflectionSign = 1;
             var fGeomList = new List<IRM21fundamentalGeometry>();
             fGeomList.Add(funGeomItem);

             rm21HorizontalAlignment HA = new rm21HorizontalAlignment(
            fundamentalGeometryList: fGeomList,
            Name: null, stationEquationing: null);

             double actualLength = HA.EndStation - HA.BeginStation;
             double expectedLength = 2439.4665;

             //Assert.AreEqual(expected: expectedLength, actual: actualLength, delta: 0.00015);
        }
        private List<IRM21fundamentalGeometry> createFundmGeoms1()
        {
            List<IRM21fundamentalGeometry> fundmtlGeoms = new List<IRM21fundamentalGeometry>();

             rm21MockFundamentalGeometry mockFG = new rm21MockFundamentalGeometry();

             List<ptsPoint> ptLst = new List<ptsPoint>();
             ptLst.Add(new ptsPoint(10.0, 10.0, 0.0));
             ptLst.Add(new ptsPoint(80.7106781188, 80.7106781188, 0.0));

             mockFG.pointList = ptLst;
             mockFG.expectedType = expectedType.LineSegment;

             fundmtlGeoms.Add(mockFG);
             return fundmtlGeoms;
        }
        public void HorizontalAlignment_singleArcHAOutsideSolutionLeft_fromFundamentalGeometry_HAlengthIs4038()
        {
            var funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(4837.3905, 5202.1148, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(3995.0953, 5346.2102, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(3861.9225, 4502.1191, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentOutsideSoluion;
             funGeomItem.deflectionSign = -1;
             var fGeomList = new List<IRM21fundamentalGeometry>();
             fGeomList.Add(funGeomItem);

             rm21HorizontalAlignment HA = new rm21HorizontalAlignment(
            fundamentalGeometryList: fGeomList,
            Name: null, stationEquationing: null);

             double actualLength = HA.EndStation - HA.BeginStation;
             double expectedLength = 4037.9558;

             //Assert.AreEqual(expected: expectedLength, actual: actualLength, delta: 0.00015);
        }
        public void HorizontalAlignment_singleArcHAOutsideSolutionLeft_fromFundamentalGeometry_HAlengthIs3396()
        {
            var funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(6925.6663, 6218.7689, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(6540.7903, 5615.8802, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(5952.2191, 6022.3138, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentOutsideSoluion;
             funGeomItem.deflectionSign = 1;
             var fGeomList = new List<IRM21fundamentalGeometry>();
             fGeomList.Add(funGeomItem);

             rm21HorizontalAlignment HA = new rm21HorizontalAlignment(
            fundamentalGeometryList: fGeomList,
            Name: null, stationEquationing: null);

             double actualLength = HA.EndStation - HA.BeginStation;
             double expectedLength = 3396.4881;

             //Assert.AreEqual(expected: expectedLength, actual: actualLength, delta: 0.0045);
        }
        public void HorizontalAlignment_singleArcHAinsideSolutionRight_fromFundamentalGeometry_HAlengthIs666()
        {
            var funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(6903.1384, 3830.6151, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(7458.9796, 3830.6151, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(7257.2446, 4348.5557, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentInsideSolution;
             funGeomItem.deflectionSign = 1;
             var fGeomList = new List<IRM21fundamentalGeometry>();
             fGeomList.Add(funGeomItem);

             rm21HorizontalAlignment HA = new rm21HorizontalAlignment(
            fundamentalGeometryList: fGeomList,
            Name: null, stationEquationing: null);

             double actualLength = HA.EndStation - HA.BeginStation;
             double expectedLength = 666.6644;

             Assert.AreEqual(expected: expectedLength, actual: actualLength, delta: 0.00015);
        }
        public void HorizontalAlignment_singleArcHAInsideSolutionLeft_fromFundamentalGeometry_HAlengthIs1051()
        {
            var funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(4003.3849, 4491.7185, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(3995.0953, 5346.2102, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(4803.1466, 5068.2214, 0.0));
             funGeomItem.expectedType = expectedType.ArcSegmentInsideSolution;
             funGeomItem.deflectionSign = -1;
             var fGeomList = new List<IRM21fundamentalGeometry>();
             fGeomList.Add(funGeomItem);

             rm21HorizontalAlignment HA = new rm21HorizontalAlignment(
            fundamentalGeometryList: fGeomList,
            Name: null, stationEquationing: null);

             double actualLength = HA.EndStation - HA.BeginStation;
             double expectedLength = 1050.8644;

             Assert.AreEqual(expected: expectedLength, actual: actualLength, delta: 0.00015);
        }
        //[Test]
        public void HorizontalAlignment_instantiateFromFundamentalGeometry_shouldNotThrowException()
        {
            var fgList = new List<IRM21fundamentalGeometry>();
             var funGeomItem = new rm21MockFundamentalGeometry();

             // Line 1, Item [0], geometric sequence 1
             funGeomItem.pointList.Add(new ptsPoint(2078236.6862, 746878.8969, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(2078312.7571, 746940.1485, 0.0));
             funGeomItem.expectedType = expectedType.LineSegment;
             fgList.Add(funGeomItem);

             // Line 2, Item [1], geometric sequence 3
             funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(2078814.5136, 747096.7721, 0.0));
             funGeomItem.pointList.Add(new ptsPoint(2079329.4845, 747059.2340, 0.0));
             funGeomItem.expectedType = expectedType.LineSegment;
             fgList.Add(funGeomItem);

             // Arc 1, Item [2], geometric sequence 2, oriented backward
             funGeomItem = new rm21MockFundamentalGeometry();
             funGeomItem.pointList.Add(new ptsPoint(2078814.5136, 747096.7721, 0.0)); // beg matches [0].end
             funGeomItem.pointList.Add(new ptsPoint(2078762.3916, 746381.7284, 0.0)); // center pt
             funGeomItem.pointList.Add(new ptsPoint(2078312.7571, 746940.1485, 0.0)); // end matches [1].begin
             funGeomItem.expectedType = expectedType.ArcSegmentInsideSolution;
             funGeomItem.deflectionSign = 1;
             fgList.Add(funGeomItem);

             try {
             var HA = new rm21HorizontalAlignment(
            fundamentalGeometryList: fgList,
            Name: null, stationEquationing: null); }
             catch (Exception e)
             { Assert.Fail("Exception not expected: \"" + e.Message + "\""); }
        }