Exemplo n.º 1
0
        public void GetSupportedInterfaces()
        {
            if (Runtime.Arch == Arch.SIMULATOR)
            {
                if (RunningOnSnowLeopard)
                {
                    Assert.Inconclusive("This test crash on the simulator with Snow Leopard");
                }

                if (TestRuntime.CheckSystemAndSDKVersion(6, 0))
                {
                    Assert.Inconclusive("This test crash on the iOS 6 simulator with Lion");
                }
            }

            string [] interfaces = CaptiveNetwork.GetSupportedInterfaces();
            if (Runtime.Arch == Arch.SIMULATOR)
            {
                // we can't assume much about the computer running the simulator
                Assert.NotNull(interfaces, "GetSupportedInterfaces");
            }
            else
            {
                Assert.That(interfaces.Length, Is.EqualTo(1), "1");
                Assert.That(interfaces [0], Is.EqualTo("en0"), "en0");
            }
        }