2016-05-26 16:06:52 +03:00
|
|
|
//
|
|
|
|
// MKOverlayPathRenderer Unit Tests
|
|
|
|
//
|
|
|
|
// Authors:
|
|
|
|
// Sebastien Pouliot <sebastien@xamarin.com>
|
|
|
|
//
|
|
|
|
// Copyright 2013 Xamarin Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#if !__TVOS__ && !__WATCHOS__
|
|
|
|
|
|
|
|
using System;
|
|
|
|
#if XAMCORE_2_0
|
|
|
|
using Foundation;
|
|
|
|
using CoreLocation;
|
|
|
|
using MapKit;
|
2018-07-04 12:44:14 +03:00
|
|
|
using ObjCRuntime;
|
2016-05-26 16:06:52 +03:00
|
|
|
#else
|
|
|
|
using MonoTouch.CoreLocation;
|
|
|
|
using MonoTouch.Foundation;
|
|
|
|
using MonoTouch.MapKit;
|
|
|
|
using MonoTouch.UIKit;
|
|
|
|
#endif
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
namespace MonoTouchFixtures.MapKit {
|
|
|
|
|
|
|
|
[TestFixture]
|
|
|
|
[Preserve (AllMembers = true)]
|
|
|
|
public class OverlayPathRendererTest {
|
2018-07-03 18:09:49 +03:00
|
|
|
[SetUp]
|
|
|
|
public void Setup ()
|
|
|
|
{
|
2018-07-04 12:44:14 +03:00
|
|
|
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 9, throwIfOtherPlatform: false);
|
2018-07-03 18:09:49 +03:00
|
|
|
}
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void DefaultCtor ()
|
|
|
|
{
|
2018-07-03 18:09:49 +03:00
|
|
|
TestRuntime.AssertXcodeVersion (5, 0, 1);
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
using (var opr = new MKOverlayPathRenderer ()) {
|
|
|
|
Assert.Null (opr.Path, "Path");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void CtorOverlay ()
|
|
|
|
{
|
2018-07-03 18:09:49 +03:00
|
|
|
TestRuntime.AssertXcodeVersion (5, 0, 1);
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
var loc = new CLLocationCoordinate2D (40, 70);
|
|
|
|
using (var overlay = MKCircle.Circle (loc, 2000))
|
|
|
|
using (var opr = new MKOverlayPathRenderer (overlay)) {
|
|
|
|
Assert.Null (opr.Path, "Path");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // !__TVOS__ && !__WATCHOS__
|