org.alfresco.repo.node
Class NodeServiceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.node.NodeServiceTest
All Implemented Interfaces:
junit.framework.Test

public class NodeServiceTest
extends junit.framework.TestCase

Tests basic NodeService functionality

Since:
4.0

Field Summary
static org.alfresco.service.namespace.QName ASSOC_QNAME_CHILDREN
           
static java.lang.String NAMESPACE
           
protected  org.alfresco.service.cmr.repository.NodeService nodeService
           
static org.alfresco.service.namespace.QName PROP_QNAME_NAME
           
protected  org.alfresco.service.cmr.repository.NodeRef rootNodeRef
          populated during setup
protected  ServiceRegistry serviceRegistry
           
static java.lang.String TEST_PREFIX
           
static org.alfresco.service.namespace.QName TYPE_QNAME_TEST
           
 
Constructor Summary
NodeServiceTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
          Clean up the test thread
 void testArchiveAndRestore()
          Tests archive and restore of simple hierarchy, checking that references and IDs are used correctly.
 void testConcurrentArchive()
          Tests that two separate node trees can be deleted concurrently at the database level.
 void testDuplicateChildNodeName()
           
 void testGetAssocById()
           
 void testLocaleSupport()
           
 void testSetUp()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAMESPACE

public static final java.lang.String NAMESPACE
See Also:
Constant Field Values

TEST_PREFIX

public static final java.lang.String TEST_PREFIX
See Also:
Constant Field Values

TYPE_QNAME_TEST

public static final org.alfresco.service.namespace.QName TYPE_QNAME_TEST

PROP_QNAME_NAME

public static final org.alfresco.service.namespace.QName PROP_QNAME_NAME

ASSOC_QNAME_CHILDREN

public static final org.alfresco.service.namespace.QName ASSOC_QNAME_CHILDREN

serviceRegistry

protected ServiceRegistry serviceRegistry

nodeService

protected org.alfresco.service.cmr.repository.NodeService nodeService

rootNodeRef

protected org.alfresco.service.cmr.repository.NodeRef rootNodeRef
populated during setup

Constructor Detail

NodeServiceTest

public NodeServiceTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
Clean up the test thread

Overrides:
tearDown in class junit.framework.TestCase

testSetUp

public void testSetUp()
               throws java.lang.Exception
Throws:
java.lang.Exception

testLocaleSupport

public void testLocaleSupport()
                       throws java.lang.Exception
Throws:
java.lang.Exception

testConcurrentArchive

public void testConcurrentArchive()
                           throws java.lang.Exception
Tests that two separate node trees can be deleted concurrently at the database level. This is not a concurren thread issue; instead we delete a hierarchy and hold the txn open while we delete another in a new txn, thereby testing that DB locks don't prevent concurrent deletes.

See: ALF-5714

Throws:
java.lang.Exception

testArchiveAndRestore

public void testArchiveAndRestore()
Tests archive and restore of simple hierarchy, checking that references and IDs are used correctly.


testGetAssocById

public void testGetAssocById()

testDuplicateChildNodeName

public void testDuplicateChildNodeName()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.