public void AddToReverseFailedRecords(GpsPosition gpsPosition) { var query = from x in this.failedReverseRecords where x.ToString() == gpsPosition.ToString() select x; if (query.FirstOrDefault() == null) { this.failedReverseRecords.Add(gpsPosition); this.WriteFailedRecords(this.failedReverseFileName, this.failedReverseRecords); } }
public void SerialGps_Position_Basic() { var x = new GpsPosition(45.5575, 18.6796, 87); Assert.AreEqual(45.5575, x.Latitude); Assert.AreEqual(18.6796, x.Longitude); Assert.AreEqual(87, x.Altitude); Assert.IsTrue(x.HasLongitude); Assert.IsTrue(x.HasLatitude); Assert.IsTrue(x.HasAltitude); Assert.AreEqual("45.5575° N, 18.6796° E", x.ToString()); }