public static void XmlSerializerFormat_Using_SupportsFault_RoundTrips_String()
    {
        BasicHttpBinding binding         = new BasicHttpBinding();
        EndpointAddress  endpointAddress = new EndpointAddress(s_basicEndpointAddress);
        ChannelFactory <IWcfServiceXmlGenerated> factory = new ChannelFactory <IWcfServiceXmlGenerated>(binding, endpointAddress);
        IWcfServiceXmlGenerated serviceProxy             = factory.CreateChannel();

        var response = serviceProxy.EchoXmlSerializerFormatSupportFaults("message", false);

        Assert.Equal("message", response);
    }
    public static void XmlSerializerFormat_Using_SupportsFault_Throws_FaultException()
    {
        BasicHttpBinding binding         = new BasicHttpBinding();
        EndpointAddress  endpointAddress = new EndpointAddress(s_basicEndpointAddress);
        ChannelFactory <IWcfServiceXmlGenerated> factory = new ChannelFactory <IWcfServiceXmlGenerated>(binding, endpointAddress);
        IWcfServiceXmlGenerated serviceProxy             = factory.CreateChannel();

        var errorMessage = "ErrorMessage";

        try
        {
            var response = serviceProxy.EchoXmlSerializerFormatSupportFaults(errorMessage, true);
        }
        catch (FaultException e)
        {
            Assert.Equal(errorMessage, e.Message);
            return;
        }

        // we shouldn't reach here.
        Assert.True(false);
    }