[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
}
}