[System] Fix compilation on watchos (#5108)
[mono.git] / mcs / class / System / Test / System.Net / HttpListenerBasicIdentityTest.cs
index d1de09391e8f097b76394663323aff58e1107f04..f998592aad737a2a7ea47fc7fa32ec4d73401a3c 100644 (file)
@@ -26,7 +26,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_0
 using System;
 using System.Net;
 using NUnit.Framework;
@@ -38,12 +37,18 @@ namespace MonoTests.System.Net {
                [ExpectedException (typeof (ArgumentNullException))]
                public void Basic1 ()
                {
+#if MONOTOUCH_WATCH || __WATCHOS__
+                       Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
                        HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity (null, null);
                }
 
                [Test]
                public void Basic2 ()
                {
+#if MONOTOUCH_WATCH || __WATCHOS__
+                       Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
                        HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("", null);
                        Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
                        Assert.AreEqual ("", bi.Name, "#02");
@@ -54,6 +59,9 @@ namespace MonoTests.System.Net {
                [Test]
                public void Basic3 ()
                {
+#if MONOTOUCH_WATCH || __WATCHOS__
+                       Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
                        HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", null);
                        Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
                        Assert.AreEqual ("hey", bi.Name, "#02");
@@ -64,6 +72,9 @@ namespace MonoTests.System.Net {
                [Test]
                public void Basic4 ()
                {
+#if MONOTOUCH_WATCH || __WATCHOS__
+                       Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
                        HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", "pass");
                        Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
                        Assert.AreEqual ("hey", bi.Name, "#02");
@@ -72,5 +83,4 @@ namespace MonoTests.System.Net {
                }
        }
 }
-#endif