From 16b4fc701fcee92c303524a19b23dee46db86058 Mon Sep 17 00:00:00 2001 From: Neil McErlean Date: Tue, 31 Mar 2009 11:27:41 +0000 Subject: [PATCH] Switched on negative test cases in association persistence and impl in product code git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13782 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../forms/FormRestApiJsonPost_Test.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/source/java/org/alfresco/repo/web/scripts/forms/FormRestApiJsonPost_Test.java b/source/java/org/alfresco/repo/web/scripts/forms/FormRestApiJsonPost_Test.java index 1f88d1a131..0d28269e37 100644 --- a/source/java/org/alfresco/repo/web/scripts/forms/FormRestApiJsonPost_Test.java +++ b/source/java/org/alfresco/repo/web/scripts/forms/FormRestApiJsonPost_Test.java @@ -208,14 +208,12 @@ public class FormRestApiJsonPost_Test extends AbstractTestFormRestApi } /** - * This test method attempts to add the same association twice. This attempt should - * not succeed. + * This test method attempts to add the same association twice. This attempt will + * not succeed, but the test case is to confirm that there is no exception thrown + * back across the REST API. */ - public void off_testAddAssocThatAlreadyExists() throws Exception + public void testAddAssocThatAlreadyExists() throws Exception { - //TODO This test has been switched off as the current implementation of assoc - // persistence does not handle this -ve test case. Currently a 500 error - // is thrown from within the repo. checkOriginalAssocsBeforeChanges(); // Add an association @@ -228,19 +226,15 @@ public class FormRestApiJsonPost_Test extends AbstractTestFormRestApi // Try to add the same association again sendRequest(new PostRequest(referencingNodeUrl, jsonPostString, APPLICATION_JSON), 200); - - fail("This TC not finished."); } /** * This test method attempts to remove an association that does not exist. This - * attempt should not succeed. + * attempt will not succeed, but the test case is to confirm that there is no + * exception thrown back across the REST API. */ - public void off_testRemoveAssocThatDoesNotExist() throws Exception + public void testRemoveAssocThatDoesNotExist() throws Exception { - //TODO This test has been switched off as the current implementation of assoc - // persistence does not handle this -ve test case. Currently a 500 error - // is thrown from within the repo. checkOriginalAssocsBeforeChanges(); // Remove a non-existent association @@ -250,8 +244,6 @@ public class FormRestApiJsonPost_Test extends AbstractTestFormRestApi String jsonPostString = jsonPostData.toString(); sendRequest(new PostRequest(referencingNodeUrl, jsonPostString, APPLICATION_JSON), 200); - - fail("This TC not finished."); } private void checkOriginalAssocsBeforeChanges()