public void SerializationTest()
        {
            // Arrange.
            const string Name = "testParameter";
            const string TypeName = "TestType";

            var method = Mock.Create<WebServiceMethodDescription>(Constructor.Mocked, Behavior.Loose);
            var parameter = new WebServiceMethodParameterDescription(method) { Name = Name, TypeName = TypeName };

            // Act.
            var element = parameter.GetXElement();
            var newParameter = WebServiceMethodParameterDescription.CreateParameterDescription(method, element);

            // Assert.
            Assert.AreEqual(Name, newParameter.Name);
            Assert.AreEqual(TypeName, newParameter.TypeName);
        }
        /// <summary>
        /// Gets the method parameter description.
        /// </summary>
        /// <param name="declaringMethod">The declaring method.</param>
        /// <param name="field">The field.</param>
        /// <returns>WebServiceMethodParameterDescription.</returns>
        private static WebServiceMethodParameterDescription GetMethodParameterDescription(WebServiceMethodDescription declaringMethod, FieldInfo field)
        {
            var parameterDescription = new WebServiceMethodParameterDescription(declaringMethod)
                                       {
                                           Name = field.Name,
                                           TypeName =
                                               field.FieldType.GetAssemblyQualifiedName(),
                                           IsSoapHeader = IsMessageHeader(field)
                                       };

            return parameterDescription;
        }