Beispiel #1
0
        public void SerialGps_Geometry_Equals()
        {
            var x1 = new GpsGeometry(1.2, 2.3, 3.4, 5, 6);
            var x2 = new GpsGeometry(1.2, 2.3, 3.4, 5, 6);
            var x3 = new GpsGeometry(1.2, 2.3, 3.4);

            Assert.IsTrue(x1.Equals(x2));
            Assert.IsTrue(x2.Equals(x1));
            Assert.IsFalse(x1.Equals(x3));
        }
Beispiel #2
0
        public void SerialGps_Geometry_Empty()
        {
            var x = new GpsGeometry();

            Assert.AreEqual(double.NaN, x.HorizontalDilution);
            Assert.AreEqual(double.NaN, x.VerticalDilution);
            Assert.AreEqual(double.NaN, x.PositionDilution);
            Assert.AreEqual(0, x.SatellitesInUse);
            Assert.AreEqual(0, x.SatellitesInView);

            Assert.IsFalse(x.HasHorizontalDilution);
            Assert.IsFalse(x.HasVerticalDilution);
            Assert.IsFalse(x.HasPositionDilution);
            Assert.IsFalse(x.HasAnySatellitesInUse);
            Assert.IsFalse(x.HasAnySatellitesInView);

            Assert.AreEqual("", x.ToString());
        }
Beispiel #3
0
        public void SerialGps_Geometry_Basic()
        {
            var x = new GpsGeometry(1.2, 2.3, 3.4, 5, 6);

            Assert.AreEqual(1.2, x.HorizontalDilution);
            Assert.AreEqual(2.3, x.VerticalDilution);
            Assert.AreEqual(3.4, x.PositionDilution);
            Assert.AreEqual(5, x.SatellitesInUse);
            Assert.AreEqual(6, x.SatellitesInView);

            Assert.IsTrue(x.HasHorizontalDilution);
            Assert.IsTrue(x.HasVerticalDilution);
            Assert.IsTrue(x.HasPositionDilution);
            Assert.IsTrue(x.HasAnySatellitesInUse);
            Assert.IsTrue(x.HasAnySatellitesInView);

            Assert.AreEqual("3.4", x.ToString());
        }