Imported Upstream version 4.2.0.179

Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent 183bba2c9a
commit 6992685b86
7507 changed files with 90259 additions and 657307 deletions

View File

@ -40,6 +40,8 @@ using System.Text;
using System.Xml;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.System.ServiceModel.Channels
{
[TestFixture]
@ -211,7 +213,7 @@ namespace MonoTests.System.ServiceModel.Channels
new HandlerTransportBindingElement (sender));
EndpointAddress address = new EndpointAddress (
new Uri ("http://localhost:37564"),
new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()),
new X509CertificateEndpointIdentity (new X509Certificate2 ("Test/Resources/test.pfx", "mono")));
ChannelFactory<IRequestChannel> cf =
@ -259,7 +261,7 @@ namespace MonoTests.System.ServiceModel.Channels
new HandlerTransportBindingElement (sender));
EndpointAddress address = new EndpointAddress (
new Uri ("http://localhost:37564"),
new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()),
new X509CertificateEndpointIdentity (new X509Certificate2 ("Test/Resources/test.pfx", "mono")));
ChannelProtectionRequirements reqs =
@ -322,7 +324,7 @@ namespace MonoTests.System.ServiceModel.Channels
new HttpTransportBindingElement ());
BindingContext ctx = new BindingContext (
cb, new BindingParameterCollection (),
new Uri ("http://localhost:37564"), String.Empty, ListenUriMode.Unique);
new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()), String.Empty, ListenUriMode.Unique);
new TextMessageEncodingBindingElement ().BuildChannelListener<IReplyChannel> (ctx);
}
@ -336,7 +338,7 @@ namespace MonoTests.System.ServiceModel.Channels
ServiceHost host = new ServiceHost (typeof (FooService));
host.AddServiceEndpoint (typeof (IFooService),
new CustomBinding (new MyBindingElement (false), new HttpTransportBindingElement ()),
"http://localhost:37564");
"http://localhost:" + NetworkHelpers.FindFreePort ());
host.Open ();
}
@ -349,7 +351,7 @@ namespace MonoTests.System.ServiceModel.Channels
ServiceHost host = new ServiceHost (typeof (FooService));
host.AddServiceEndpoint (typeof (IFooService),
new CustomBinding (new MyBindingElement (true), new HttpTransportBindingElement ()),
"http://localhost:37564");
"http://localhost:" + NetworkHelpers.FindFreePort ());
host.Open ();
host.Close ();
}
@ -363,7 +365,7 @@ namespace MonoTests.System.ServiceModel.Channels
ServiceHost host = new ServiceHost (typeof (FooService));
host.AddServiceEndpoint (typeof (IFooService),
new CustomBinding (new MyBindingElement (true), new HttpTransportBindingElement ()),
"http://localhost:37564", new Uri ("foobar", UriKind.Relative));
"http://localhost:" + NetworkHelpers.FindFreePort (), new Uri ("foobar", UriKind.Relative));
}
[Test]
@ -372,10 +374,10 @@ namespace MonoTests.System.ServiceModel.Channels
{
// MyBindingElement overrides GetProperty<T>() to call GetInnerProperty<T>() (default implementation).
// HttpTransportBindingElement should return Soap11.
ServiceHost host = new ServiceHost (typeof (FooService), new Uri ("http://localhost:37564"));
ServiceHost host = new ServiceHost (typeof (FooService), new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
host.AddServiceEndpoint (typeof (IFooService),
new CustomBinding (new MyBindingElement (true), new HttpTransportBindingElement ()),
"http://localhost:37564", new Uri ("foobar", UriKind.Relative));
"http://localhost:" + NetworkHelpers.FindFreePort (), new Uri ("foobar", UriKind.Relative));
host.Open ();
host.Close ();
}