Merge pull request #3563 from lewurm/interpreter
[mono.git] / mcs / class / System.ServiceModel.Web / Test / System.ServiceModel.Description / WebScriptEnablingBehaviorTest.cs
index d735c2ebb702ba28999c3cd9a6ee9653856419a9..b2dd26364e780989c4bc1a66bf7674f35c6e19d5 100644 (file)
@@ -25,7 +25,7 @@
 // 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 !MOBILE
+#if !MOBILE && !MONOMAC
 using System;
 using System.Net;
 using System.Runtime.Serialization;
@@ -38,6 +38,8 @@ using System.ServiceModel.Web;
 using System.Text;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Description
 {
        public class MyHostFactory : WebScriptServiceHostFactory
@@ -64,7 +66,7 @@ namespace MonoTests.System.ServiceModel.Description
                [Test]
                public void ScriptGenerator ()
                {
-                       var url = "http://localhost:37564";
+                       var url = "http://localhost:" + NetworkHelpers.FindFreePort ();
                        var host = new MyHostFactory ().CreateServiceHost (typeof (HogeService));
                        var binding = new WebHttpBinding ();
                        host.AddServiceEndpoint (typeof (IHogeService), binding, url);