public void TestClassDoNotEncodListValues() { var obj = new DictionaryObjectTestClass1(); var result = obj.ToQueryString(_serializationOptionsUrlDisableEncode1); result.Should().NotBeNullOrEmpty("Query String creation failed"); result.Should().Contain("Param1=Class1 Value"); result.Should().Contain("Param2=1"); result.Should().Contain("ParamList1=listItem1,listItem2,listItem3"); }
public void TestSimpleClassIgnoreBasedOnAttributes() { var obj = new DictionaryObjectTestClass1(); var result = obj.ToQueryString(_serializationOptionsAttributeFilter2); result.Should().NotBeNullOrEmpty("Query String creation failed"); result.Should().Contain("Param1=Class1%20Value"); result.Should().Contain("Param2=1"); result.Should().NotContain("ParamList1=listItem1%2ClistItem2%2ClistItem3"); }
public void TestSimpleClassDefaultOptions() { var obj = new DictionaryObjectTestClass1(); var result = obj.ToQueryString(); result.Should().NotBeNullOrEmpty("Query String creation failed"); result.Should().Contain("Param1=Class1%20Value"); result.Should().Contain("Param2=1"); result.Should().Contain("ParamList1=listItem1%2ClistItem2%2ClistItem3"); result.Should().NotContain("someParam1=Class1Value"); }
public void TestQueryParamFunc1() { var obj = new DictionaryObjectTestClass1(); var result = obj.ToQueryString(_serializationOptionsUrlQueryParamFunc1); result.Should().NotBeNullOrEmpty("Query String creation failed"); result.Should().Contain("Param1=Class1%20ValueModfied"); result.Should().Contain("Param2=1"); result.Should().Contain("ParamList1=listItem1%2ClistItem2%2ClistItem3"); result.Should().NotContain("someParam1=Class1Value"); }