Exemplo n.º 1
0
        public void ConfigureService_alters_ServiceBehaviorAttribute(WcfServiceHostConfiguration <TestService> configurator, ServiceHost serviceHost, AddressFilterMode filterMode)
        {
            configurator.ConfigureService(service => service.AddressFilterMode = filterMode);

            configurator.ConfigureServiceHost(serviceHost);

            Assert.That(serviceHost.Description.Behaviors.Find <ServiceBehaviorAttribute>().AddressFilterMode, Is.EqualTo(filterMode));
        }
Exemplo n.º 2
0
        public void ConfigureService_alters_ServiceBehaviorAttribute(WcfServiceHostConfiguration <TestService> configurator, Action <ServiceBehaviorAttribute> testDelegate, ServiceHost serviceHost)
        {
            configurator.ConfigureService(testDelegate);

            configurator.ConfigureServiceHost(serviceHost);

            Mock.Get(testDelegate).Verify(p => p(serviceHost.Description.Behaviors.Find <ServiceBehaviorAttribute>()));
        }