Ejemplo n.º 1
0
        public void CallbackTimeoutsElement_defaults()
        {
            CallbackTimeoutsElement element = new CallbackTimeoutsElement();

            Assert.AreEqual("System.ServiceModel.Description.CallbackTimeoutsBehavior", element.BehaviorType.FullName, "BehaviorType");
            Assert.AreEqual("callbackTimeouts", element.ConfigurationElementName, "ConfigurationElementName");
            Assert.AreEqual(new TimeSpan(0, 0, 0), element.TransactionTimeout, "TransactionTimeout");
        }
Ejemplo n.º 2
0
        public void CallbackTimeoutsElement()
        {
            EndpointBehaviorElement behavior = OpenConfig();
            CallbackTimeoutsElement element  = (CallbackTimeoutsElement)behavior [typeof(CallbackTimeoutsElement)];

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

            Assert.AreEqual("System.ServiceModel.Description.CallbackTimeoutsBehavior", element.BehaviorType.FullName, "BehaviorType");
            Assert.AreEqual("callbackTimeouts", element.ConfigurationElementName, "ConfigurationElementName");
            Assert.AreEqual(new TimeSpan(0, 2, 30), element.TransactionTimeout, "TransactionTimeout");
        }