Castle.Facilities.WcfIntegration.Tests.WcfClientFixture.WillNotDiscoverServiceEndpointIfScopesDontMatch C# (CSharp) Method

WillNotDiscoverServiceEndpointIfScopesDontMatch() private method

private WillNotDiscoverServiceEndpointIfScopesDontMatch ( ) : void
return void
		public void WillNotDiscoverServiceEndpointIfScopesDontMatch()
		{
			using (new WindsorContainer()
				.AddFacility<WcfFacility>(f => f.CloseTimeout = TimeSpan.Zero)
				.Register(Component.For<Operations>()
					.DependsOn(new { number = 28 })
					.AsWcfService(new DefaultServiceModel()
						.AddEndpoints(WcfEndpoint.ForContract<IOperations>()
							.BoundTo(new NetTcpBinding { PortSharingEnabled = true })
							.At("net.tcp://localhost/Operations2"))
						.Discoverable(discover => discover.InScope("urn:castle:wcf"))
				)))
			{
				using (var clientContainer = new WindsorContainer()
					.AddFacility<WcfFacility>()
					.Register(Component.For<IOperations>()
						.AsWcfClient(WcfEndpoint.Discover()
							.InScope("urn:castle:rocks")
							.Span(TimeSpan.FromSeconds(2)))
					))
				{
					var client = clientContainer.Resolve<IOperations>();
					Assert.AreEqual(28, client.GetValueFromConstructor());
				}
			}
		}
WcfClientFixture