Merge pull request #4219 from marek-safar/corert-bump
[mono.git] / mcs / class / System.ServiceModel.Web / Test / System.ServiceModel.Description / WebHttpBehaviorTest.cs
index bba9cb3553db4669e3657c94eb8151d837df22be..dd4d46ab0133615b66f107213ab113efa683a7e0 100644 (file)
@@ -22,7 +22,7 @@ namespace MonoTests.System.ServiceModel.Description
                {
                        return GetRequestClientFormatter (operationDescription, endpoint);
                }
-
+#if !MOBILE
                public IDispatchMessageFormatter DoGetReplyDispatchFormatter (OperationDescription operationDescription, ServiceEndpoint endpoint)
                {
                        return GetReplyDispatchFormatter (operationDescription, endpoint);
@@ -32,7 +32,7 @@ namespace MonoTests.System.ServiceModel.Description
                {
                        return GetRequestDispatchFormatter (operationDescription, endpoint);
                }
-
+#endif
                public event Action<ServiceEndpoint, ClientRuntime> ApplyClientBehaviorInvoked;
 
                public override void ApplyClientBehavior (ServiceEndpoint endpoint, ClientRuntime client)
@@ -59,11 +59,9 @@ namespace MonoTests.System.ServiceModel.Description
                        Assert.AreEqual (WebMessageBodyStyle.Bare, b.DefaultBodyStyle, "#1");
                        Assert.AreEqual (WebMessageFormat.Xml, b.DefaultOutgoingRequestFormat, "#2");
                        Assert.AreEqual (WebMessageFormat.Xml, b.DefaultOutgoingResponseFormat, "#3");
-#if NET_4_0
                        Assert.IsFalse (b.AutomaticFormatSelectionEnabled, "#11");
                        Assert.IsFalse (b.FaultExceptionEnabled, "#12");
                        Assert.IsFalse (b.HelpEnabled, "#13");
-#endif
                }
 
                [Test]
@@ -76,6 +74,7 @@ namespace MonoTests.System.ServiceModel.Description
                        Assert.AreEqual (0, pl.Count, "#1");
                }
 
+#if !MOBILE && !MONOMAC
                [Test]
                public void ApplyDispatchBehavior ()
                {
@@ -120,6 +119,7 @@ namespace MonoTests.System.ServiceModel.Description
 
                        Assert.AreEqual (0, ed.DispatchRuntime.Operations.Count, "#4-0"); // hmm... really?
                }
+#endif
 
                [Test]
                public void GetMessageFormatters ()
@@ -129,8 +129,10 @@ namespace MonoTests.System.ServiceModel.Description
                        var b = new WebHttpBehaviorExt ();
                        Assert.IsNotNull (b.DoGetRequestClientFormatter (od, se), "#1");
                        Assert.IsNotNull (b.DoGetReplyClientFormatter (od, se), "#2");
+#if !MOBILE
                        Assert.IsNotNull (b.DoGetRequestDispatchFormatter (od, se), "#3");
                        Assert.IsNotNull (b.DoGetReplyDispatchFormatter (od, se), "#4");
+#endif
                }
 
                [Test]
@@ -153,6 +155,7 @@ namespace MonoTests.System.ServiceModel.Description
                        }
                }
 
+#if !MOBILE
                [Test]
                public void RequestClientFormatter2 ()
                {
@@ -174,6 +177,7 @@ namespace MonoTests.System.ServiceModel.Description
 
                        // TODO: test DeserializeReply too (it is supported unlike above).
                }
+#endif
 
                [ServiceContract]
                public interface IMyService
@@ -189,7 +193,9 @@ namespace MonoTests.System.ServiceModel.Description
 
                public class MyService: IMyService
                {
+#if !MOBILE
                        [OperationBehavior]
+#endif
                        public string Echo (string input)
                        {
                                return input;
@@ -204,6 +210,7 @@ namespace MonoTests.System.ServiceModel.Description
                        Assert.IsTrue (od.Behaviors.Contains (typeof (WebGetAttribute)), "Operation is recognized as WebGet");
                }
 
+#if !MOBILE
                [Test]
                public void MessageFormatterSupportsRaw ()
                {
@@ -247,7 +254,7 @@ namespace MonoTests.System.ServiceModel.Description
                        formatter.DeserializeRequest (msg, pars);
                        Assert.IsTrue (pars [0] is Stream, "ret");
                }
-
+#endif
                [ServiceContract]
                public interface IMultipleParametersGet
                {