Repository: syncope
Updated Branches:
  refs/heads/1_2_X 091b0662c -> 876fde9aa


removed useless try/catch for delete test, SYNCOPE-707


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

Branch: refs/heads/1_2_X
Commit: 876fde9aa6abe7501a6cfdd53e32be0828ecdf03
Parents: 091b066
Author: massi <[email protected]>
Authored: Tue Oct 13 16:22:05 2015 +0200
Committer: massi <[email protected]>
Committed: Tue Oct 13 16:22:05 2015 +0200

----------------------------------------------------------------------
 .../syncope/core/rest/ConfigurationTestITCase.java      | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/876fde9a/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java 
b/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
index ca70092..c34015c 100644
--- 
a/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
+++ 
b/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.core.rest;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -79,16 +80,13 @@ public class ConfigurationTestITCase extends AbstractTest {
         AttributeTO tokenLength = configurationService.read("token.length");
 
         configurationService.delete("token.length");
-        try {
-            configurationService.read("token.length");
-            fail("The delete operation should throw an exception because 
token.length does not exist anymore");
-        } catch (SyncopeClientException e) {
-            assertEquals(Response.Status.NOT_FOUND, 
e.getType().getResponseStatus());
-        }
+
+        AttributeTO actual = 
configurationService.read(tokenLength.getSchema());
+        assertNotEquals(actual, tokenLength);
 
         configurationService.set(tokenLength.getSchema(), tokenLength);
 
-        AttributeTO actual = 
configurationService.read(tokenLength.getSchema());
+        actual = configurationService.read(tokenLength.getSchema());
         assertEquals(actual, tokenLength);
     }
 

Reply via email to