2016-05-26 16:06:52 +03:00
|
|
|
|
// Copyright 2011 Xamarin Inc. All rights reserved
|
|
|
|
|
|
2017-10-31 19:09:21 +03:00
|
|
|
|
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using Foundation;
|
|
|
|
|
using ObjCRuntime;
|
|
|
|
|
using UIKit;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace MonoTouchFixtures.UIKit {
|
|
|
|
|
|
|
|
|
|
[TestFixture]
|
|
|
|
|
[Preserve (AllMembers = true)]
|
|
|
|
|
public class ReferenceLibraryViewControllerTest {
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void InitWithTerm ()
|
|
|
|
|
{
|
2018-07-04 12:44:14 +03:00
|
|
|
|
if (Runtime.Arch == Arch.DEVICE && TestRuntime.CheckSystemVersion (PlatformName.iOS, 9, 0))
|
2016-05-26 16:06:52 +03:00
|
|
|
|
Assert.Ignore ("crash on iOS9 devices");
|
|
|
|
|
using (UIReferenceLibraryViewController rlvc = new UIReferenceLibraryViewController ("Mono")) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
[Ignore ("ios6 beta issues")]
|
|
|
|
|
public void DictionaryHasDefinitionForTerm ()
|
|
|
|
|
{
|
|
|
|
|
// note: iOS 6 beta 3 fails with: +[_UIDictionaryWrapper _availableDictionaryAssets] returned failed - retrying. Error: Error Domain=ASError Code=4 "The operation couldn’t be completed. (ASError error 4 - Unable to copy asset information)" UserInfo=0x16ac81a0 {NSDescription=Unable to copy asset information}
|
|
|
|
|
// beta 3 always return true, beta 4 false ...
|
|
|
|
|
Assert.True (UIReferenceLibraryViewController.DictionaryHasDefinitionForTerm ("Mono"), "Mono");
|
|
|
|
|
Assert.False (UIReferenceLibraryViewController.DictionaryHasDefinitionForTerm ("zozo"), "zozo");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // !__TVOS__ && !__WATCHOS__
|