// // Unit tests for CFProxy[Settings] // // Authors: // Sebastien Pouliot // // Copyright 2012 Xamarin Inc. All rights reserved. // using System; #if XAMCORE_2_0 using Foundation; using CoreFoundation; using ObjCRuntime; #else using MonoTouch; using MonoTouch.CoreFoundation; using MonoTouch.Foundation; using MonoTouch.ObjCRuntime; #endif using NUnit.Framework; namespace MonoTouchFixtures.CoreFoundation { [TestFixture] [Preserve (AllMembers = true)] public class ProxyTest { [Test] public void Fields () { // documented but symbols are missing // this test will fail if Apple decide to include them in the future IntPtr lib = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0); try { // http://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFProxySupport/Reference/reference.html#//apple_ref/doc/c_ref/kCFProxyAutoConfigurationHTTPResponseKey Assert.That (Dlfcn.dlsym (lib, "kCFProxyAutoConfigurationHTTPResponseKey"), Is.EqualTo (IntPtr.Zero), "kCFProxyAutoConfigurationHTTPResponseKey"); // http://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFProxySupport/Reference/reference.html#//apple_ref/doc/c_ref/kCFNetworkProxiesProxyAutoConfigJavaScript Assert.That (Dlfcn.dlsym (lib, "kCFNetworkProxiesProxyAutoConfigJavaScript"), Is.EqualTo (IntPtr.Zero), "kCFNetworkProxiesProxyAutoConfigJavaScript"); } finally { Dlfcn.dlclose (lib); } } } }