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"); }
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"); }