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
This commit is contained in:
Neil McErlean
2009-03-26 16:54:34 +00:00
parent b1c3801f60
commit 436f79cb78

View File

@@ -36,7 +36,6 @@ import java.util.Map;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap; import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.forms.AssociationFieldDefinition.Direction; 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.forms.PropertyFieldDefinition.FieldConstraint;
import org.alfresco.repo.jscript.ClasspathScriptLocation; import org.alfresco.repo.jscript.ClasspathScriptLocation;
import org.alfresco.repo.security.authentication.AuthenticationComponent; 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.addAspect(document, ContentModel.ASPECT_REFERENCING, aspectProps);
this.nodeService.createAssociation(this.document, this.associatedDoc, ContentModel.ASSOC_REFERENCES); this.nodeService.createAssociation(this.document, this.associatedDoc, ContentModel.ASSOC_REFERENCES);
//setComplete(); // setComplete();
//endTransaction(); // endTransaction();
} }
private void createUser(String userName) private void createUser(String userName)
@@ -365,6 +364,7 @@ public class FormServiceImplTest extends BaseAlfrescoSpringTest
assertEquals(this.associatedDoc.toString(), targets.get(0)); assertEquals(this.associatedDoc.toString(), targets.get(0));
} }
@SuppressWarnings("unchecked")
public void testSaveForm() throws Exception public void testSaveForm() throws Exception
{ {
// create FormData object containing the values to update // 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<QName, Serializable> aspectProps = new HashMap<QName, Serializable>(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 public void testNoForm() throws Exception
{ {
// test that a form can not be retrieved for a non-existent item // test that a form can not be retrieved for a non-existent item