Search in sources :

Example 1 with CasYamlHttpMessageConverter

use of org.apereo.cas.web.CasYamlHttpMessageConverter in project cas by apereo.

the class CasYamlHttpMessageConverterTests method verifyOperation.

@Test
public void verifyOperation() throws Exception {
    val input = new CasYamlHttpMessageConverter();
    val outputMessage = new MockHttpOutputMessage();
    input.write(getService(), MediaType.APPLICATION_JSON, outputMessage);
    assertNotNull(outputMessage.getBodyAsString());
    input.write(List.of(getService()), MediaType.APPLICATION_JSON, outputMessage);
    assertNotNull(outputMessage.getBodyAsString());
}
Also used : lombok.val(lombok.val) CasYamlHttpMessageConverter(org.apereo.cas.web.CasYamlHttpMessageConverter) MockHttpOutputMessage(org.springframework.mock.http.MockHttpOutputMessage) Test(org.junit.jupiter.api.Test)

Aggregations

lombok.val (lombok.val)1 CasYamlHttpMessageConverter (org.apereo.cas.web.CasYamlHttpMessageConverter)1 Test (org.junit.jupiter.api.Test)1 MockHttpOutputMessage (org.springframework.mock.http.MockHttpOutputMessage)1