void CheckEmpty(MKPolyline pl) { // MKAnnotation Assert.That(pl.Coordinate.Longitude, Is.NaN, "Coordinate.Longitude"); if (TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.That(pl.Coordinate.Latitude, Is.EqualTo(-90f), "Coordinate.Latitude"); } else { Assert.That(pl.Coordinate.Latitude, Is.NaN, "Coordinate.Latitude"); } Assert.Null(pl.Title, "Title"); Assert.Null(pl.Subtitle, "Subtitle"); // MKOverlay Assert.True(Double.IsPositiveInfinity(pl.BoundingMapRect.Origin.X), "BoundingMapRect.Origin.X"); Assert.True(Double.IsPositiveInfinity(pl.BoundingMapRect.Origin.Y), "BoundingMapRect.Origin.Y"); if (TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.That(pl.BoundingMapRect.Size.Height, Is.EqualTo(0.0f), "BoundingMapRect.Size.Height"); Assert.That(pl.BoundingMapRect.Size.Width, Is.EqualTo(0.0f), "BoundingMapRect.Size.Width"); } else { Assert.True(Double.IsNegativeInfinity(pl.BoundingMapRect.Size.Height), "BoundingMapRect.Size.Height"); Assert.True(Double.IsNegativeInfinity(pl.BoundingMapRect.Size.Width), "BoundingMapRect.Size.Width"); } Assert.False(pl.Intersects(pl.BoundingMapRect), "Intersect/Self"); MKMapRect rect = new MKMapRect(0, 0, 0, 0); Assert.False(pl.Intersects(rect), "Intersect/Empty"); ShapeTest.CheckShape(pl); }