public static void AreEqual(this WfServiceOperationDefinition actual, WfServiceOperationDefinitionConfigurationElement element)
        {
            AssertStringEqual(actual.OperationName, element.OperationName);
            AssertStringEqual(actual.RtnXmlStoreParamName, element.ReturnParamName);
            AssertStringEqual(actual.AddressDef.Key, element.AddressKey);

            Assert.AreEqual(actual.InvokeWhenPersist, element.InvokeWhenPersist);

            actual.Params.AreEqual(element.Parameters);
        }
        public static void AreEqual(this WfServiceOperationDefinition actual, WfServiceOperationDefinitionConfigurationElement element)
        {
            AssertStringEqual(actual.OperationName, element.OperationName);
            AssertStringEqual(actual.RtnXmlStoreParamName, element.ReturnParamName);
            AssertStringEqual(actual.AddressDef.Key, element.AddressKey);

            Assert.AreEqual(actual.InvokeWhenPersist, element.InvokeWhenPersist);

            actual.Params.AreEqual(element.Parameters);
        }
Esempio n. 3
0
        public void ServiceDefinitionSettingsTest()
        {
            WfServiceOperationDefinitionConfigurationElement operationElement =
                WfServiceDefinitionSettings.GetSection().Operations["PCGetVersion"];

            Assert.IsNotNull(operationElement);

            WfServiceOperationDefinition operation = new WfServiceOperationDefinition(operationElement);

            operation.AreEqual(operationElement);
        }
Esempio n. 4
0
        public void CallServiceTest()
        {
            WfServiceOperationDefinitionConfigurationElement operationElement =
                WfServiceDefinitionSettings.GetSection().Operations["PCGetVersion"];

            Assert.IsNotNull(operationElement);

            WfServiceOperationDefinition operation = new WfServiceOperationDefinition(operationElement);

            WfServiceInvoker.InvokeContext["Version"]  = string.Empty;
            WfServiceInvoker.InvokeContext["callerID"] = "Zheng Shen";

            WfServiceInvoker invoker = new WfServiceInvoker(operation);

            invoker.Invoke();

            string result = WfServiceInvoker.InvokeContext.GetValue("Version", string.Empty);

            Console.WriteLine(result);

            Assert.IsTrue(result.IndexOf(WfServiceInvoker.InvokeContext.GetValue("callerID", string.Empty)) >= 0);
        }