syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/5] syncope git commit: [SYNCOPE-654] Extra test on ExceptionMapper
Date Wed, 15 Apr 2015 08:57:38 GMT
[SYNCOPE-654] Extra test on ExceptionMapper


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6a343e95
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6a343e95
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6a343e95

Branch: refs/heads/master
Commit: 6a343e959303cf9bd1a5121fb7ee85205751309c
Parents: adc2f7f
Author: giacomolm <giacomolm@hotmail.it>
Authored: Wed Apr 15 10:13:15 2015 +0200
Committer: giacomolm <giacomolm@hotmail.it>
Committed: Wed Apr 15 10:13:15 2015 +0200

----------------------------------------------------------------------
 .../core/rest/ExceptionMapperTestITCase.java    | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/6a343e95/core/src/test/java/org/apache/syncope/core/rest/ExceptionMapperTestITCase.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/syncope/core/rest/ExceptionMapperTestITCase.java
b/core/src/test/java/org/apache/syncope/core/rest/ExceptionMapperTestITCase.java
index 34d275b..4140fce 100644
--- a/core/src/test/java/org/apache/syncope/core/rest/ExceptionMapperTestITCase.java
+++ b/core/src/test/java/org/apache/syncope/core/rest/ExceptionMapperTestITCase.java
@@ -18,10 +18,12 @@
  */
 package org.apache.syncope.core.rest;
 
+import static org.junit.Assert.fail;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 import org.apache.commons.io.IOUtils;
+import org.apache.syncope.common.SyncopeClientCompositeException;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.to.SchemaTO;
 import org.apache.syncope.common.to.UserTO;
@@ -114,4 +116,23 @@ public class ExceptionMapperTestITCase extends AbstractTest {
         }
     }
 
+    @Test
+    public void headersMultiValue() {
+        UserTO userTO = new UserTO();
+        String userId = getUUIDString() + "issue654@syncope.apache.org";
+        userTO.setUsername(userId);
+        userTO.setPassword("password");
+
+        userTO.getAttrs().add(attributeTO("userId", "issue654"));
+        userTO.getAttrs().add(attributeTO("fullname", userId));
+        userTO.getAttrs().add(attributeTO("surname", userId));
+
+        try {
+            createUser(userTO);
+            fail();
+        } catch (SyncopeClientCompositeException e) {
+            Assert.assertEquals(2, e.getExceptions().size());
+        }
+    }
+
 }


Mime
View raw message