// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
+#if !MOBILE
+
using NUnit.Framework;
using System;
static ManualResetEvent reset;
private string message;
private string hostname;
- private IPAddress ip;
[TestFixtureSetUp]
public void FixtureSetUp ()
{
reset = new ManualResetEvent (false);
hostname = Dns.GetHostName ();
- ip = Dns.Resolve (site).AddressList[0];
+ var ip = Dns.Resolve (site).AddressList[0];
}
[TestFixtureTearDown]
[Test]
[DnsPermission (SecurityAction.Deny, Unrestricted = true)]
-#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
// so it's not a declarative attribute on the method as the
// null check is done before throwing the SecurityException
-#else
- [ExpectedException (typeof (SecurityException))]
-#endif
public void Deny_GetHostByName_Null ()
{
Dns.GetHostByName (null);
Dns.Resolve (null);
}
-#if NET_2_0
// TODO: New 2.0 methods aren't yet implemented in Mono
/*
[Test]
Dns.GetHostAddresses (null);
}
*/
-#endif
// ensure that only DnsPermission is required to call the methods
Dns.Resolve (null);
}
-#if NET_2_0
// TODO: New 2.0 methods aren't yet implemented in Mono
/*
[Test]
Dns.GetHostAddresses (null);
}
*/
-#endif
// async tests (for stack propagation)
Assert.IsNull (message, message);
}
-#if NET_2_0
// TODO: New 2.0 methods aren't yet implemented in Mono
/*
[DnsPermission (SecurityAction.Deny, Unrestricted = true)]
Assert.IsNull (message, message);
}
*/
-#endif
}
}
+
+#endif