Ejemplo n.º 1
0
        public void ServiceThrottlingElement_defaults()
        {
            ServiceThrottlingElement element = new ServiceThrottlingElement();

            Assert.AreEqual(typeof(ServiceThrottlingBehavior), element.BehaviorType, "BehaviorType");
            Assert.AreEqual("serviceThrottling", element.ConfigurationElementName, "ConfigurationElementName");

            Assert.AreEqual(16, element.MaxConcurrentCalls, "MaxConcurrentCalls");
            Assert.AreEqual(10, element.MaxConcurrentSessions, "MaxConcurrentSessions");
            Assert.AreEqual(26, element.MaxConcurrentInstances, "MaxConcurrentInstances");
        }
Ejemplo n.º 2
0
        public void ServiceThrottlingElement()
        {
            ServiceBehaviorElement   behavior = OpenConfig();
            ServiceThrottlingElement element  = (ServiceThrottlingElement)behavior [typeof(ServiceThrottlingElement)];

            if (element == null)
            {
                Assert.Fail("ServiceThrottlingElement is not exist in collection.");
            }

            Assert.AreEqual(typeof(ServiceThrottlingBehavior), element.BehaviorType, "BehaviorType");
            Assert.AreEqual("serviceThrottling", element.ConfigurationElementName, "ConfigurationElementName");

            Assert.AreEqual(32, element.MaxConcurrentCalls, "MaxConcurrentCalls");
            Assert.AreEqual(20, element.MaxConcurrentSessions, "MaxConcurrentSessions");
            Assert.AreEqual(14, element.MaxConcurrentInstances, "MaxConcurrentInstances");
        }