public void Excludes_optional_Item()
        {
            var test = new TestClass {Age = 4};
            var result = new HttpPostSerializer().Serialize(test);

            result.ShouldEqual("Age=4");
        }
 public void Formats_property()
 {
     var test = new TestClassWithFormat {Age = 5.5m};
     var result = new HttpPostSerializer().Serialize(test);
     result.ShouldEqual("Age=5.50");
 }
 public void Encodes_property()
 {
     var test = new TestClass {Name = "hello there"};
     var result = new HttpPostSerializer().Serialize(test);
     result.ShouldEqual("Name=hello+there&Age=0");
 }
 public void Does_not_encode_when_Unencoded_attribute_used()
 {
     var test = new TestClassWithUnencodedProperty {Name = "hello there"};
     var result = new HttpPostSerializer().Serialize(test);
     result.ShouldEqual("Name=hello there");
 }