Example usage for org.springframework.web.util HtmlUtils htmlEscape

List of usage examples for org.springframework.web.util HtmlUtils htmlEscape

Introduction

In this page you can find the example usage for org.springframework.web.util HtmlUtils htmlEscape.

Prototype

public static String htmlEscape(String input, String encoding) 

Source Link

Document

Turn special characters into HTML character references.

Usage

From source file:org.cloudfoundry.identity.uaa.oauth.CheckTokenEndpointMockMvcTest.java

@Test
void check_token_get() throws Exception {
    check_token(get("/check_token"), status().isMethodNotAllowed())
            .andExpect(jsonPath("$.error").value("method_not_allowed"))
            .andExpect(jsonPath("$.error_description")
                    .value(HtmlUtils.htmlEscape("Request method 'GET' not supported", "ISO-8859-1")));

}

From source file:org.cloudfoundry.identity.uaa.oauth.CheckTokenEndpointMockMvcTest.java

@Test
void check_token_put() throws Exception {
    check_token(put("/check_token"), status().isMethodNotAllowed())
            .andExpect(jsonPath("$.error").value("method_not_allowed"))
            .andExpect(jsonPath("$.error_description")
                    .value(HtmlUtils.htmlEscape("Request method 'PUT' not supported", "ISO-8859-1")));

}

From source file:org.cloudfoundry.identity.uaa.oauth.CheckTokenEndpointMockMvcTest.java

@Test
void check_token_delete() throws Exception {
    check_token(MockMvcRequestBuilders.delete("/check_token"), status().isMethodNotAllowed())
            .andExpect(jsonPath("$.error").value("method_not_allowed"))
            .andExpect(jsonPath("$.error_description")
                    .value(HtmlUtils.htmlEscape("Request method 'DELETE' not supported", "ISO-8859-1")));
}