Repository: syncope Updated Branches: refs/heads/master 2e7713b61 -> 685262803
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/68526280 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/68526280 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/68526280 Branch: refs/heads/master Commit: 6852628030c6492a85fbaeaa81d9001315f5d985 Parents: 2e7713b Author: massi <[email protected]> Authored: Tue Oct 13 16:17:45 2015 +0200 Committer: massi <[email protected]> Committed: Tue Oct 13 16:17:45 2015 +0200 ---------------------------------------------------------------------- .../fit/core/reference/ConfigurationITCase.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/68526280/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java index dc618eb..4635be5 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java @@ -19,6 +19,7 @@ package org.apache.syncope.fit.core.reference; 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; @@ -76,17 +77,15 @@ public class ConfigurationITCase extends AbstractITCase { AttrTO tokenLength = configurationService.get("token.length"); configurationService.delete("token.length"); - try { - configurationService.get("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()); - } + + AttrTO actual = configurationService.get(tokenLength.getSchema()); + assertNotEquals(actual, tokenLength); configurationService.set(tokenLength); - AttrTO actual = configurationService.get(tokenLength.getSchema()); + actual = configurationService.get(tokenLength.getSchema()); assertEquals(actual, tokenLength); + } @Test
