Imported Upstream version 6.12.0.86

Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-07-10 08:44:59 +00:00
parent 92747312ea
commit 0b380204a4
812 changed files with 26901 additions and 9053 deletions

View File

@@ -19,6 +19,9 @@ namespace MonoTests.System.Net.NetworkInformation
public class IPInterfacePropertiesTest
{
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void AtLeastOneUnicastAddress ()
{
int numUnicastAddresses = 0;
@@ -112,10 +115,13 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void DnsEnabled ()
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
Assert.Ignore ("IsDnsEnabled is not nessasarily enabled for all interfaces on windows.");
Assert.Ignore ("IsDnsEnabled is not necessarily enabled for all interfaces on windows.");
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
foreach (NetworkInterface adapter in adapters)
@@ -126,6 +132,9 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
// The code works as expected when part of a regular app. It fails when executed from within an NUnit test
// Might be a problem with the test suite. To investigate.
[Category("AndroidNotWorking")]

View File

@@ -19,18 +19,27 @@ namespace MonoTests.System.Net.NetworkInformation
public class NetworkInterfaceTest
{
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void IsNetworkAvailable ()
{
Assert.IsTrue (NetworkInterface.GetIsNetworkAvailable ());
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void LoopbackInterfaceIndex ()
{
Assert.IsTrue (NetworkInterface.LoopbackInterfaceIndex > 0);
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void AtLeastOneInterface ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -38,6 +47,9 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceId ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -45,6 +57,9 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceName ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -52,6 +67,9 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceType ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -59,6 +77,9 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceOperationalStatus ()
{
var adapter = NetworkInterface.GetAllNetworkInterfaces ()[0];
@@ -68,6 +89,9 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceSpeed ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -75,6 +99,9 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void IPv4Mask ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();