From 436f79cb7829e92ba090aa4fbf48cd97b9d4af77 Mon Sep 17 00:00:00 2001 From: Neil McErlean Date: Thu, 26 Mar 2009 16:54:34 +0000 Subject: [PATCH] Fixing the build. Also changed forms test code to use multiple assocs git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13754 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/forms/FormServiceImplTest.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/repo/forms/FormServiceImplTest.java b/source/java/org/alfresco/repo/forms/FormServiceImplTest.java index 1e7e1fc2c7..e89b4a9c74 100644 --- a/source/java/org/alfresco/repo/forms/FormServiceImplTest.java +++ b/source/java/org/alfresco/repo/forms/FormServiceImplTest.java @@ -36,7 +36,6 @@ import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.repo.content.MimetypeMap; import org.alfresco.repo.forms.AssociationFieldDefinition.Direction; -import org.alfresco.repo.forms.FormData.FieldData; import org.alfresco.repo.forms.PropertyFieldDefinition.FieldConstraint; import org.alfresco.repo.jscript.ClasspathScriptLocation; import org.alfresco.repo.security.authentication.AuthenticationComponent; @@ -192,8 +191,8 @@ public class FormServiceImplTest extends BaseAlfrescoSpringTest this.nodeService.addAspect(document, ContentModel.ASPECT_REFERENCING, aspectProps); this.nodeService.createAssociation(this.document, this.associatedDoc, ContentModel.ASSOC_REFERENCES); - //setComplete(); - //endTransaction(); +// setComplete(); +// endTransaction(); } private void createUser(String userName) @@ -365,6 +364,7 @@ public class FormServiceImplTest extends BaseAlfrescoSpringTest assertEquals(this.associatedDoc.toString(), targets.get(0)); } + @SuppressWarnings("unchecked") public void testSaveForm() throws Exception { // create FormData object containing the values to update @@ -429,6 +429,22 @@ public class FormServiceImplTest extends BaseAlfrescoSpringTest } } +// public void testApplyAspectProgrammatically() throws Exception +// { +// NodeRef nrSrc = new NodeRef("workspace://SpacesStore/320c74ad-dc79-4812-adf1-8160c37fdecb"); +// NodeRef nrDest = new NodeRef("workspace://SpacesStore/5ac5ccac-3409-4f4a-9338-a39ee1acd2cb"); +// +// Map aspectProps = new HashMap(2); +// // add referencing aspect (has association) +// this.nodeService.addAspect(nrSrc, ContentModel.ASPECT_REFERENCING, aspectProps); +// this.nodeService.createAssociation(nrSrc, nrDest, ContentModel.ASSOC_REFERENCES); +// +// setComplete(); +// endTransaction(); +// +// System.out.println("did it work?"); +// } +// public void testNoForm() throws Exception { // test that a form can not be retrieved for a non-existent item