2016-05-26 16:06:52 +03:00
|
|
|
|
//
|
|
|
|
|
// Unit tests for UISearchControllerTest
|
|
|
|
|
//
|
|
|
|
|
// Authors:
|
|
|
|
|
// Alex Soto <alex.soto@xamarin.com>
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// Copyright 2015 Xamarin Inc. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
2017-10-31 19:09:21 +03:00
|
|
|
|
#if !__WATCHOS__ && !MONOMAC
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using Foundation;
|
|
|
|
|
using UIKit;
|
2018-07-04 12:44:14 +03:00
|
|
|
|
using ObjCRuntime;
|
2016-05-26 16:06:52 +03:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace MonoTouchFixtures.UIKit {
|
|
|
|
|
[TestFixture]
|
|
|
|
|
[Preserve (AllMembers = true)]
|
|
|
|
|
public class UISearchControllerTest {
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void InitWithNibNameTest ()
|
|
|
|
|
{
|
2018-07-04 12:44:14 +03:00
|
|
|
|
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
|
|
UISearchController ctrl = new UISearchController (null, null);
|
|
|
|
|
Assert.NotNull (ctrl, "UISearchController ctor(String, NSBundle)");
|
|
|
|
|
|
|
|
|
|
ctrl.Delegate = new UISearchControllerDelegate ();
|
|
|
|
|
Assert.NotNull (ctrl.Delegate, "UISearchController instance is not usable ");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // !__WATCHOS__
|