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

ThrowsEndPointNotFoundException() private method

private ThrowsEndPointNotFoundException ( ) : void
return void
		public void ThrowsEndPointNotFoundException()
		{
			Func<IWindsorContainer> createLocalContainer = () =>
				new WindsorContainer()
				.AddFacility<WcfFacility>(f => f.CloseTimeout = TimeSpan.Zero)
				.Register(
					Component.For<Operations>()
						.DependsOn(new { number = 42 })
						.AsWcfService(new DefaultServiceModel().AddEndpoints(
							WcfEndpoint.ForContract<IOperations>()
								.BoundTo(new NetTcpBinding { PortSharingEnabled = true })
								.At("net.tcp://localhost/Operations1"))
						)
					);

			windsorContainer.Register(
				Component.For<IOperationsEx>()
					.Named("operations")
					.AsWcfClient(new DefaultClientModel
					{
						Endpoint = WcfEndpoint
							.BoundTo(new NetTcpBinding { PortSharingEnabled = true })
							.At("net.tcp://localhost/Operations2")
					})
				);

			using (createLocalContainer())
			{
				var client = windsorContainer.Resolve<IOperationsEx>("operations");
				client.Backup(new Dictionary<string, object>());
			}
		}
WcfClientFixture