Example #1
0
        public void ReadShouldContinueIfALineIsInvalid()
        {
            var txt = @"
XY000,50.0,10.0,AA
XY001,50.0,abc,
XY002,50.0,10.0,BB";

            var wptList = new WaypointList();
            var codes   = new FixesLoader(wptList).Read(txt.Lines());

            Assert.AreEqual(2, codes.FirstToSecond.Keys.Count());
        }
Example #2
0
        public void ReadTest()
        {
            var txt = @"
XY000,50.0,10.0,AA
XY001,50.0,10.0,
XY002,50.0,10.0,BB";

            var wptList = new WaypointList();
            var codes   = new FixesLoader(wptList).Read(txt.Lines());

            Assert.IsTrue(wptList.AllWaypoints.SequenceEqual(
                              new Waypoint("XY000", 50.0, 10.0, 1),
                              new Waypoint("XY001", 50.0, 10.0, Waypoint.DefaultCountryCode),
                              new Waypoint("XY002", 50.0, 10.0, 2)));
        }