From b8c87450a3c679e0654b57f402ddce84ff86711a Mon Sep 17 00:00:00 2001 From: Matthias Piepkorn <mpiepk@gmail.com> Date: Sun, 29 Jan 2017 18:30:29 +0000 Subject: [PATCH] Add .travis.yml --- src/test/java/org/keycloak/protocol/cas/ServiceResponseTest.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/keycloak/protocol/cas/ServiceResponseTest.java b/src/test/java/org/keycloak/protocol/cas/ServiceResponseTest.java index 349c0c8..4e07135 100644 --- a/src/test/java/org/keycloak/protocol/cas/ServiceResponseTest.java +++ b/src/test/java/org/keycloak/protocol/cas/ServiceResponseTest.java @@ -1,7 +1,8 @@ package org.keycloak.protocol.cas; import org.junit.Test; -import org.keycloak.protocol.cas.representations.CasServiceResponse; +import org.keycloak.protocol.cas.representations.CASErrorCode; +import org.keycloak.protocol.cas.representations.CASServiceResponse; import org.keycloak.protocol.cas.utils.ServiceResponseHelper; import org.keycloak.protocol.cas.utils.ServiceResponseMarshaller; @@ -45,13 +46,13 @@ private static final String EXPECTED_JSON_FAILURE = "{\n" + " \"serviceResponse\" : {\n" + " \"authenticationFailure\" : {\n" + - " \"code\" : \"ERROR_CODE\",\n" + + " \"code\" : \"INVALID_REQUEST\",\n" + " \"description\" : \"Error description\"\n" + " }\n" + " }\n" + "}"; private static final String EXPECTED_XML_FAILURE = "<cas:serviceResponse xmlns:cas=\"http://www.yale.edu/tp/cas\">\n" + - " <cas:authenticationFailure code=\"ERROR_CODE\">Error description</cas:authenticationFailure>\n" + + " <cas:authenticationFailure code=\"INVALID_REQUEST\">Error description</cas:authenticationFailure>\n" + "</cas:serviceResponse>"; @Test @@ -61,7 +62,7 @@ attributes.put("int", 123); attributes.put("string", "abc"); - CasServiceResponse response = ServiceResponseHelper.createSuccess("username", attributes, "PGTIOU-test", + CASServiceResponse response = ServiceResponseHelper.createSuccess("username", attributes, "PGTIOU-test", Arrays.asList("https://proxy1/pgtUrl", "https://proxy2/pgtUrl")); assertEquals(EXPECTED_JSON_SUCCESS, ServiceResponseMarshaller.marshalJson(response)); @@ -70,7 +71,7 @@ @Test public void testErrorResponse() throws Exception { - CasServiceResponse response = ServiceResponseHelper.createFailure("ERROR_CODE", "Error description"); + CASServiceResponse response = ServiceResponseHelper.createFailure(CASErrorCode.INVALID_REQUEST, "Error description"); assertEquals(EXPECTED_JSON_FAILURE, ServiceResponseMarshaller.marshalJson(response)); assertEquals(EXPECTED_XML_FAILURE, ServiceResponseMarshaller.marshalXml(response)); -- Gitblit v1.9.1