mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix issues raised by tests
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2565 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,11 +33,9 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.alfresco.util.PropertyMap;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* Checks that tagging of <i>incomplete</i> nodes is done properly.
|
||||
@@ -49,12 +47,6 @@ public class IncompleteNodeTaggerTest extends TestCase
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(IncompleteNodeTaggerTest.class);
|
||||
|
||||
private static ApplicationContext ctx;
|
||||
static
|
||||
{
|
||||
ctx = ApplicationContextHelper.getApplicationContext();
|
||||
}
|
||||
|
||||
private IncompleteNodeTagger tagger;
|
||||
private ServiceRegistry serviceRegistry;
|
||||
private NodeService nodeService;
|
||||
@@ -65,7 +57,7 @@ public class IncompleteNodeTaggerTest extends TestCase
|
||||
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
DictionaryDAO dictionaryDao = (DictionaryDAO) ctx.getBean("dictionaryDAO");
|
||||
DictionaryDAO dictionaryDao = (DictionaryDAO) IntegrityTest.ctx.getBean("dictionaryDAO");
|
||||
ClassLoader cl = BaseNodeServiceTest.class.getClassLoader();
|
||||
// load the test model
|
||||
InputStream modelStream = cl.getResourceAsStream("org/alfresco/repo/node/integrity/IntegrityTest_model.xml");
|
||||
@@ -73,11 +65,11 @@ public class IncompleteNodeTaggerTest extends TestCase
|
||||
M2Model model = M2Model.createModel(modelStream);
|
||||
dictionaryDao.putModel(model);
|
||||
|
||||
tagger = (IncompleteNodeTagger) ctx.getBean("incompleteNodeTagger");
|
||||
tagger = (IncompleteNodeTagger) IntegrityTest.ctx.getBean("incompleteNodeTagger");
|
||||
|
||||
serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
serviceRegistry = (ServiceRegistry) IntegrityTest.ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
nodeService = serviceRegistry.getNodeService();
|
||||
this.authenticationComponent = (AuthenticationComponent)ctx.getBean("authenticationComponent");
|
||||
this.authenticationComponent = (AuthenticationComponent)IntegrityTest.ctx.getBean("authenticationComponent");
|
||||
|
||||
this.authenticationComponent.setSystemUserAsCurrentUser();
|
||||
|
||||
|
@@ -79,7 +79,7 @@ public class IntegrityTest extends TestCase
|
||||
public static final QName TEST_PROP_INT_B = QName.createQName(NAMESPACE, "prop-int-b");
|
||||
public static final QName TEST_PROP_INT_C = QName.createQName(NAMESPACE, "prop-int-c");
|
||||
|
||||
private static ApplicationContext ctx;
|
||||
public static ApplicationContext ctx;
|
||||
static
|
||||
{
|
||||
ctx = ApplicationContextHelper.getApplicationContext();
|
||||
|
@@ -115,7 +115,7 @@
|
||||
<properties>
|
||||
<property name="test:prop-int-a">
|
||||
<type>d:int</type>
|
||||
<mandatory>true</mandatory>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
</property>
|
||||
<property name="test:prop-int-b">
|
||||
<type>d:int</type>
|
||||
|
Reference in New Issue
Block a user