You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
@ -7,6 +7,8 @@ using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Web;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Activation
|
||||
{
|
||||
class MyHostFactory : WebScriptServiceHostFactory
|
||||
@ -23,8 +25,9 @@ namespace MonoTests.System.ServiceModel.Activation
|
||||
[Test]
|
||||
public void CreateServiceHost ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
var f = new MyHostFactory ();
|
||||
var host = f.DoCreateServiceHost (typeof (TestService), new Uri [] {new Uri ("http://localhost:37564")});
|
||||
var host = f.DoCreateServiceHost (typeof (TestService), new Uri [] {new Uri ($"http://localhost:{port}")});
|
||||
Assert.IsFalse (host is WebServiceHost, "#1");
|
||||
host.Open ();
|
||||
host.Close ();
|
||||
@ -34,8 +37,9 @@ namespace MonoTests.System.ServiceModel.Activation
|
||||
[ExpectedException (typeof (NotSupportedException))]
|
||||
public void ResponseWrappedIsInvalid ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
var f = new MyHostFactory ();
|
||||
var host = f.DoCreateServiceHost (typeof (TestService2), new Uri [] {new Uri ("http://localhost:37564")});
|
||||
var host = f.DoCreateServiceHost (typeof (TestService2), new Uri [] {new Uri ($"http://localhost:{port}")});
|
||||
host.Open (); // should raise an error here.
|
||||
}
|
||||
|
||||
@ -43,8 +47,9 @@ namespace MonoTests.System.ServiceModel.Activation
|
||||
[ExpectedException (typeof (InvalidOperationException))]
|
||||
public void MultipleContract ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
var f = new MyHostFactory ();
|
||||
var host = f.DoCreateServiceHost (typeof (TestServiceMultiple), new Uri [] {new Uri ("http://localhost:37564")});
|
||||
var host = f.DoCreateServiceHost (typeof (TestServiceMultiple), new Uri [] {new Uri ($"http://localhost:{port}")});
|
||||
host.Open ();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user