public void Serialize_IFormattable_WithoutIrreversibleSerialization(Type type, object content)
        {
            // set up
            PlainTextFormatter formatter = new PlainTextFormatter();

            // verify
            Assert.Throws<InvalidOperationException>(() => this.GetRequest(content, formatter, type));
        }
        public string Serialize_String(string content)
        {
            // set up
            PlainTextFormatter formatter = new PlainTextFormatter();
            HttpRequestMessage request = this.GetRequest(content, formatter);

            // verify
            return this.GetSerialized(content, request, formatter);
        }
        public void Serialize_IFormattable_WithoutIrreversibleSerialization(Type type, object content)
        {
            // set up
            PlainTextFormatter formatter = new PlainTextFormatter();
            HttpRequestMessage request = this.GetRequest(content, formatter, type);

            // verify
            this.GetSerialized(content, request, formatter);
        }
        public string Serialize_IFormattable(Type type, object content)
        {
            // set up
            PlainTextFormatter formatter = new PlainTextFormatter { AllowIrreversibleSerialization = true };
            HttpRequestMessage request = this.GetRequest(content, formatter, type);

            // verify
            return this.GetSerialized(content, request, formatter);
        }
        public object Deserialize_String(string content)
        {
            // set up
            PlainTextFormatter formatter = new PlainTextFormatter();
            HttpRequestMessage request = this.GetRequest(content, formatter);

            // verify
            return this.GetDeserialized(typeof(string), content, request, formatter);
        }