Search in sources :

Example 6 with DynamicHtmlGen

use of org.wso2.carbon.apimgt.rest.api.common.codegen.DynamicHtmlGen in project carbon-apimgt by wso2.

the class DynamicHtmlGenTestCase method testEscapeUnsafeCharacters.

@Test
public void testEscapeUnsafeCharacters() throws Exception {
    DynamicHtmlGen htmlGen = new DynamicHtmlGen();
    final String stringToEscape = "hello\nworld";
    String result = htmlGen.escapeUnsafeCharacters(stringToEscape);
    // Shouldn't be escaped
    Assert.assertEquals(result, stringToEscape);
}
Also used : DynamicHtmlGen(org.wso2.carbon.apimgt.rest.api.common.codegen.DynamicHtmlGen) Test(org.testng.annotations.Test)

Aggregations

Test (org.testng.annotations.Test)6 DynamicHtmlGen (org.wso2.carbon.apimgt.rest.api.common.codegen.DynamicHtmlGen)6 CodegenOperation (io.swagger.codegen.CodegenOperation)2 Operation (io.swagger.models.Operation)2 CodegenParameter (io.swagger.codegen.CodegenParameter)1 Path (io.swagger.models.Path)1 Swagger (io.swagger.models.Swagger)1 Parameter (io.swagger.models.parameters.Parameter)1 QueryParameter (io.swagger.models.parameters.QueryParameter)1 ArrayList (java.util.ArrayList)1