Merged HEAD (5.1) to 5.1.N (5.1.1)

117315 tpage: ACE-2671 Unit tests for QNameTypeEditor.
   The QNameTypeEditor was migrated from RM to repo in r83388, but
   at the time there were no unit tests. This closes the issue by
   adding unit tests.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@117384 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tatyana Valkevych
2015-11-12 10:21:30 +00:00
parent 15f7d63375
commit 3ca1dfd1ea
5 changed files with 202 additions and 54 deletions

View File

@@ -76,7 +76,7 @@ public class BeanExtender implements BeanFactoryPostProcessor
// check for extending bean // check for extending bean
if (!beanFactory.containsBean(extendingBeanName)) if (!beanFactory.containsBean(extendingBeanName))
{ {
throw new NoSuchBeanDefinitionException("Can't find bean '" + extendingBeanName + "' that is going to extend origional bean definition."); throw new NoSuchBeanDefinitionException("Can't find bean '" + extendingBeanName + "' that is going to extend original bean definition.");
} }
// get the bean definitions // get the bean definitions

View File

@@ -48,7 +48,7 @@ public class Repository01TestSuite extends TestSuite
{ {
suite.addTestSuite(org.alfresco.RepositoryStartStopTest.class); suite.addTestSuite(org.alfresco.RepositoryStartStopTest.class);
} }
static void tests3(TestSuite suite) // tests="76" time="82.566" static void tests3(TestSuite suite) // tests="76" time="82.566"
{ {
suite.addTestSuite(org.alfresco.email.server.EmailServiceImplTest.class); suite.addTestSuite(org.alfresco.email.server.EmailServiceImplTest.class);
@@ -57,32 +57,32 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.filesys.repo.CifsIntegrationTest.class); suite.addTestSuite(org.alfresco.filesys.repo.CifsIntegrationTest.class);
suite.addTestSuite(org.alfresco.filesys.repo.ContentDiskDriverTest.class); suite.addTestSuite(org.alfresco.filesys.repo.ContentDiskDriverTest.class);
} }
static void tests4(TestSuite suite) // tests="2" time="92.624" static void tests4(TestSuite suite) // tests="2" time="92.624"
{ {
suite.addTestSuite(org.alfresco.filesys.repo.LockKeeperImplTest.class); suite.addTestSuite(org.alfresco.filesys.repo.LockKeeperImplTest.class);
} }
static void tests6(TestSuite suite) static void tests6(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.opencmis.CMISTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.opencmis.CMISTest.class));
} }
static void tests7(TestSuite suite) // tests="3" time="7.644" static void tests7(TestSuite suite) // tests="3" time="7.644"
{ {
suite.addTestSuite(org.alfresco.opencmis.OpenCmisLocalTest.class); // fails if with OpenCmisQueryTest suite.addTestSuite(org.alfresco.opencmis.OpenCmisLocalTest.class); // fails if with OpenCmisQueryTest
} }
static void tests8(TestSuite suite) static void tests8(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.opencmis.search.OpenCmisQueryTest.class); suite.addTestSuite(org.alfresco.opencmis.search.OpenCmisQueryTest.class);
} }
static void tests9(TestSuite suite) static void tests9(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.action.ActionTestSuite.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.action.ActionTestSuite.class));
} }
static void tests10(TestSuite suite) static void tests10(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.activities.ActivityServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.activities.ActivityServiceImplTest.class);
@@ -93,12 +93,12 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.admin.registry.RegistryServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.admin.registry.RegistryServiceImplTest.class);
suite.addTestSuite(org.alfresco.repo.attributes.AttributeServiceTest.class); suite.addTestSuite(org.alfresco.repo.attributes.AttributeServiceTest.class);
} }
static void tests11(TestSuite suite) static void tests11(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.audit.AuditTestSuite.suite()); suite.addTest(org.alfresco.repo.audit.AuditTestSuite.suite());
} }
static void tests13(TestSuite suite) static void tests13(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.blog.BlogServiceImplTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.blog.BlogServiceImplTest.class));
@@ -113,27 +113,27 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.coci.CheckOutCheckInServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.coci.CheckOutCheckInServiceImplTest.class);
suite.addTestSuite(org.alfresco.repo.configuration.ConfigurableServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.configuration.ConfigurableServiceImplTest.class);
} }
static void tests15(TestSuite suite) static void tests15(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.content.ContentFullContextTestSuite.suite()); suite.addTest(org.alfresco.repo.content.ContentFullContextTestSuite.suite());
} }
static void tests16(TestSuite suite) static void tests16(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.content.ContentMinimalContextTestSuite.suite()); suite.addTest(org.alfresco.repo.content.ContentMinimalContextTestSuite.suite());
} }
static void tests17(TestSuite suite) static void tests17(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.content.caching.CachingContentStoreTestSuite.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.content.caching.CachingContentStoreTestSuite.class));
} }
static void tests18(TestSuite suite) static void tests18(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.copy.CopyServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.copy.CopyServiceImplTest.class);
} }
static void tests21(TestSuite suite) static void tests21(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.descriptor.DescriptorServiceTest.class); suite.addTestSuite(org.alfresco.repo.descriptor.DescriptorServiceTest.class);
@@ -144,30 +144,30 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.dictionary.types.period.PeriodTest.class); suite.addTestSuite(org.alfresco.repo.dictionary.types.period.PeriodTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.discussion.DiscussionServiceImplTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.discussion.DiscussionServiceImplTest.class));
} }
static void tests22(TestSuite suite) static void tests22(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.domain.DomainTestSuite.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.domain.DomainTestSuite.class));
} }
static void tests23(TestSuite suite) static void tests23(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.download.DownloadServiceIntegrationTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.download.DownloadServiceIntegrationTest.class));
suite.addTestSuite(org.alfresco.repo.exporter.ExporterComponentTest.class); suite.addTestSuite(org.alfresco.repo.exporter.ExporterComponentTest.class);
suite.addTestSuite(org.alfresco.repo.exporter.RepositoryExporterComponentTest.class); suite.addTestSuite(org.alfresco.repo.exporter.RepositoryExporterComponentTest.class);
} }
static void tests24(TestSuite suite) static void tests24(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.forms.FormServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.forms.FormServiceImplTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.forms.processor.action.ActionFormProcessorTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.forms.processor.action.ActionFormProcessorTest.class));
} }
static void tests27(TestSuite suite) // static void tests27(TestSuite suite) //
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.forum.CommentsTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.forum.CommentsTest.class));
} }
static void tests28(TestSuite suite) // tests="53" time="178.25" static void tests28(TestSuite suite) // tests="53" time="178.25"
{ {
suite.addTestSuite(org.alfresco.repo.i18n.MessageServiceImplTest.class); // fails if with previous tests suite.addTestSuite(org.alfresco.repo.i18n.MessageServiceImplTest.class); // fails if with previous tests
@@ -178,7 +178,7 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.importer.ImporterComponentTest.class); suite.addTestSuite(org.alfresco.repo.importer.ImporterComponentTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.invitation.InvitationCleanupTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.invitation.InvitationCleanupTest.class));
} }
static void tests29(TestSuite suite) // tests="12" time="93.965" static void tests29(TestSuite suite) // tests="12" time="93.965"
{ {
suite.addTestSuite(org.alfresco.repo.jscript.PeopleTest.class); // fails if with previous tests suite.addTestSuite(org.alfresco.repo.jscript.PeopleTest.class); // fails if with previous tests
@@ -186,7 +186,7 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.jscript.ScriptBehaviourTest.class); suite.addTestSuite(org.alfresco.repo.jscript.ScriptBehaviourTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.jscript.ScriptNodeTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.jscript.ScriptNodeTest.class));
} }
static void tests30(TestSuite suite) // tests="70" time="62.041" failures="1" static void tests30(TestSuite suite) // tests="70" time="62.041" failures="1"
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.links.LinksServiceImplTest.class)); // fails if run more than once // fails if with previous tests suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.links.LinksServiceImplTest.class)); // fails if run more than once // fails if with previous tests
@@ -197,12 +197,12 @@ public class Repository01TestSuite extends TestSuite
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.lock.mem.LockableAspectInterceptorTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.lock.mem.LockableAspectInterceptorTest.class));
suite.addTestSuite(org.alfresco.repo.management.JmxDumpUtilTest.class); suite.addTestSuite(org.alfresco.repo.management.JmxDumpUtilTest.class);
} }
static void tests31(TestSuite suite) static void tests31(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.model.ModelTestSuite.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.model.ModelTestSuite.class));
} }
static void tests32(TestSuite suite) static void tests32(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.module.ComponentsTest.class); suite.addTestSuite(org.alfresco.repo.module.ComponentsTest.class);
@@ -212,18 +212,18 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.node.FullNodeServiceTest.class); suite.addTestSuite(org.alfresco.repo.node.FullNodeServiceTest.class);
suite.addTestSuite(org.alfresco.repo.node.NodeRefPropertyMethodInterceptorTest.class); suite.addTestSuite(org.alfresco.repo.node.NodeRefPropertyMethodInterceptorTest.class);
} }
static void tests33(TestSuite suite) static void tests33(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.node.NodeServiceTest.class)); // moved to next test suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.node.NodeServiceTest.class)); // moved to next test
} }
static void tests34(TestSuite suite) static void tests34(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.node.PerformanceNodeServiceTest.class); suite.addTestSuite(org.alfresco.repo.node.PerformanceNodeServiceTest.class);
suite.addTestSuite(org.alfresco.repo.node.archive.ArchiveAndRestoreTest.class); suite.addTestSuite(org.alfresco.repo.node.archive.ArchiveAndRestoreTest.class);
} }
static void tests35(TestSuite suite) // tests="86" time="553.462" static void tests35(TestSuite suite) // tests="86" time="553.462"
{ {
suite.addTestSuite(org.alfresco.repo.node.archive.LargeArchiveAndRestoreTest.class); suite.addTestSuite(org.alfresco.repo.node.archive.LargeArchiveAndRestoreTest.class);
@@ -231,19 +231,19 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.node.db.DbNodeServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.node.db.DbNodeServiceImplTest.class);
suite.addTestSuite(org.alfresco.repo.node.db.DbNodeServiceImplPropagationTest.class); suite.addTestSuite(org.alfresco.repo.node.db.DbNodeServiceImplPropagationTest.class);
} }
static void tests36(TestSuite suite) // Fails with previous tests static void tests36(TestSuite suite) // Fails with previous tests
{ {
suite.addTestSuite(org.alfresco.repo.node.getchildren.GetChildrenCannedQueryTest.class); suite.addTestSuite(org.alfresco.repo.node.getchildren.GetChildrenCannedQueryTest.class);
suite.addTestSuite(org.alfresco.repo.node.index.FullIndexRecoveryComponentTest.class); suite.addTestSuite(org.alfresco.repo.node.index.FullIndexRecoveryComponentTest.class);
suite.addTestSuite(org.alfresco.repo.node.index.IndexTransactionTrackerTest.class); suite.addTestSuite(org.alfresco.repo.node.index.IndexTransactionTrackerTest.class);
} }
static void tests37(TestSuite suite) // Hangs with the previous 4 tests static void tests37(TestSuite suite) // Hangs with the previous 4 tests
{ {
suite.addTestSuite(org.alfresco.repo.node.index.MissingContentReindexComponentTest.class); suite.addTestSuite(org.alfresco.repo.node.index.MissingContentReindexComponentTest.class);
} }
static void tests38(TestSuite suite) static void tests38(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.node.integrity.IncompleteNodeTaggerTest.class); suite.addTestSuite(org.alfresco.repo.node.integrity.IncompleteNodeTaggerTest.class);
@@ -253,12 +253,12 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.policy.PolicyComponentTransactionTest.class); suite.addTestSuite(org.alfresco.repo.policy.PolicyComponentTransactionTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.preference.PreferenceServiceImplTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.preference.PreferenceServiceImplTest.class));
} }
static void tests39(TestSuite suite) static void tests39(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.publishing.WebPublishingTestSuite.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.publishing.WebPublishingTestSuite.class));
} }
static void tests40(TestSuite suite) static void tests40(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.quickshare.QuickShareServiceIntegrationTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.quickshare.QuickShareServiceIntegrationTest.class));
@@ -268,13 +268,13 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.rendition.RenditionServiceIntegrationTest.class); suite.addTestSuite(org.alfresco.repo.rendition.RenditionServiceIntegrationTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.rendition.RenditionServicePermissionsTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.rendition.RenditionServicePermissionsTest.class));
} }
static void tests41(TestSuite suite) // tests="6" time="120.585" static void tests41(TestSuite suite) // tests="6" time="120.585"
{ {
suite.addTestSuite(org.alfresco.repo.rendition.StandardRenditionLocationResolverTest.class); suite.addTestSuite(org.alfresco.repo.rendition.StandardRenditionLocationResolverTest.class);
suite.addTestSuite(org.alfresco.repo.rendition.executer.HTMLRenderingEngineTest.class); suite.addTestSuite(org.alfresco.repo.rendition.executer.HTMLRenderingEngineTest.class);
} }
static void tests42(TestSuite suite) // tests="27" time="134.585" static void tests42(TestSuite suite) // tests="27" time="134.585"
{ {
suite.addTestSuite(org.alfresco.repo.rendition.executer.XSLTFunctionsTest.class); // fails if with previous tests suite.addTestSuite(org.alfresco.repo.rendition.executer.XSLTFunctionsTest.class); // fails if with previous tests
@@ -282,78 +282,78 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.replication.ReplicationServiceIntegrationTest.class); suite.addTestSuite(org.alfresco.repo.replication.ReplicationServiceIntegrationTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.rule.MiscellaneousRulesTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.rule.MiscellaneousRulesTest.class));
} }
static void tests43(TestSuite suite) // tests="53" time="113.999" static void tests43(TestSuite suite) // tests="53" time="113.999"
{ {
suite.addTestSuite(org.alfresco.repo.rule.RuleLinkTest.class); // fails if with previous tests suite.addTestSuite(org.alfresco.repo.rule.RuleLinkTest.class); // fails if with previous tests
suite.addTestSuite(org.alfresco.repo.rule.RuleServiceCoverageTest.class); suite.addTestSuite(org.alfresco.repo.rule.RuleServiceCoverageTest.class);
suite.addTestSuite(org.alfresco.repo.rule.RuleServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.rule.RuleServiceImplTest.class);
} }
static void tests44(TestSuite suite) // tests="2" time="104.636" errors="1" static void tests44(TestSuite suite) // tests="2" time="104.636" errors="1"
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.rule.RuleServiceIntegrationTest.class)); // fails locally even on its own suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.rule.RuleServiceIntegrationTest.class)); // fails locally even on its own
} }
static void tests45(TestSuite suite) // tests="13" time="97.186" static void tests45(TestSuite suite) // tests="13" time="97.186"
{ {
suite.addTestSuite(org.alfresco.repo.rule.RuleTypeImplTest.class); suite.addTestSuite(org.alfresco.repo.rule.RuleTypeImplTest.class);
suite.addTestSuite(org.alfresco.repo.rule.ruletrigger.RuleTriggerTest.class); suite.addTestSuite(org.alfresco.repo.rule.ruletrigger.RuleTriggerTest.class);
} }
static void tests46(TestSuite suite) static void tests46(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.search.SearchTestSuite.suite()); suite.addTest(org.alfresco.repo.search.SearchTestSuite.suite());
} }
static void tests47(TestSuite suite) static void tests47(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.security.SecurityTestSuite.suite()); suite.addTest(org.alfresco.repo.security.SecurityTestSuite.suite());
} }
static void tests48(TestSuite suite) static void tests48(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizerTest.class); // failed on agent - split from following tests? suite.addTestSuite(org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizerTest.class); // failed on agent - split from following tests?
} }
static void tests49(TestSuite suite) // Not sure this break is needed static void tests49(TestSuite suite) // Not sure this break is needed
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.site.SiteServiceImplMoreTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.site.SiteServiceImplMoreTest.class));
suite.addTestSuite(org.alfresco.repo.site.SiteServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.site.SiteServiceImplTest.class);
} }
static void tests50(TestSuite suite) static void tests50(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.solr.SOLRTrackingComponentTest.class); suite.addTestSuite(org.alfresco.repo.solr.SOLRTrackingComponentTest.class);
} }
static void tests51(TestSuite suite) static void tests51(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.subscriptions.SubscriptionServiceActivitiesTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.subscriptions.SubscriptionServiceActivitiesTest.class));
} }
static void tests52(TestSuite suite) static void tests52(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.subscriptions.SubscriptionServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.subscriptions.SubscriptionServiceImplTest.class);
} }
static void tests53(TestSuite suite) static void tests53(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.tagging.TaggingServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.tagging.TaggingServiceImplTest.class);
suite.addTestSuite(org.alfresco.repo.tagging.UpdateTagScopesActionExecuterTest.class); suite.addTestSuite(org.alfresco.repo.tagging.UpdateTagScopesActionExecuterTest.class);
} }
static void tests55(TestSuite suite) static void tests55(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.template.TemplateServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.template.TemplateServiceImplTest.class);
} }
static void tests56(TestSuite suite) static void tests56(TestSuite suite)
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.tenant.MultiTServiceImplTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.tenant.MultiTServiceImplTest.class));
suite.addTestSuite(org.alfresco.repo.tenant.MultiTDemoTest.class); suite.addTestSuite(org.alfresco.repo.tenant.MultiTDemoTest.class);
} }
static void tests57(TestSuite suite) static void tests57(TestSuite suite)
{ {
suite.addTestSuite(org.alfresco.repo.tenant.MultiTNodeServiceInterceptorTest.class); suite.addTestSuite(org.alfresco.repo.tenant.MultiTNodeServiceInterceptorTest.class);
@@ -364,7 +364,7 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.transaction.RetryingTransactionHelperTest.class); suite.addTestSuite(org.alfresco.repo.transaction.RetryingTransactionHelperTest.class);
suite.addTestSuite(org.alfresco.repo.transaction.TransactionAwareSingletonTest.class); suite.addTestSuite(org.alfresco.repo.transaction.TransactionAwareSingletonTest.class);
suite.addTestSuite(org.alfresco.repo.transaction.TransactionServiceImplTest.class); suite.addTestSuite(org.alfresco.repo.transaction.TransactionServiceImplTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.transaction.ConnectionPoolOverloadTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.transaction.ConnectionPoolOverloadTest.class));
suite.addTestSuite(org.alfresco.repo.transfer.NodeCrawlerTest.class); suite.addTestSuite(org.alfresco.repo.transfer.NodeCrawlerTest.class);
suite.addTestSuite(org.alfresco.repo.transfer.RepoTransferReceiverImplTest.class); suite.addTestSuite(org.alfresco.repo.transfer.RepoTransferReceiverImplTest.class);
suite.addTestSuite(org.alfresco.repo.transfer.TransferServiceCallbackTest.class); suite.addTestSuite(org.alfresco.repo.transfer.TransferServiceCallbackTest.class);
@@ -375,22 +375,22 @@ public class Repository01TestSuite extends TestSuite
suite.addTestSuite(org.alfresco.repo.transfer.script.ScriptTransferServiceTest.class); suite.addTestSuite(org.alfresco.repo.transfer.script.ScriptTransferServiceTest.class);
suite.addTestSuite(org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinitionTest.class); suite.addTestSuite(org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinitionTest.class);
} }
static void tests58(TestSuite suite) static void tests58(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.usage.UsageTestSuite.suite()); suite.addTest(org.alfresco.repo.usage.UsageTestSuite.suite());
} }
static void tests59(TestSuite suite) static void tests59(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.version.VersionTestSuite.suite()); suite.addTest(org.alfresco.repo.version.VersionTestSuite.suite());
} }
static void tests61(TestSuite suite) static void tests61(TestSuite suite)
{ {
suite.addTest(org.alfresco.repo.workflow.WorkflowTestSuite.suite()); suite.addTest(org.alfresco.repo.workflow.WorkflowTestSuite.suite());
} }
static void tests63(TestSuite suite) // tests="187" time="364.334" static void tests63(TestSuite suite) // tests="187" time="364.334"
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.schemacomp.DbToXMLTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.util.schemacomp.DbToXMLTest.class));
@@ -434,4 +434,9 @@ public class Repository01TestSuite extends TestSuite
// This test opens, closes and again opens the alfresco application context. // This test opens, closes and again opens the alfresco application context.
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.dictionary.CustomModelRepoRestartTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.dictionary.CustomModelRepoRestartTest.class));
} }
static void tests69(TestSuite suite)
{
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.policy.annotation.QNameTypeEditorTest.class));
}
} }

View File

@@ -0,0 +1,38 @@
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* See {@link Repository01TestSuite}
*
* @author Tom Page
*/
public class Repository69TestSuite extends TestSuite
{
public static Test suite()
{
TestSuite suite = new TestSuite();
Repository01TestSuite.tests69(suite);
return suite;
}
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright (C) 2013-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.policy.annotation;
import static org.junit.Assert.assertEquals;
import org.alfresco.service.namespace.QName;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.apache.commons.lang3.ArrayUtils;
import org.junit.AfterClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
/**
* Application context tests for the automatic QName converter.
*
* @author Tom Page
*/
@Category(OwnJVMTestsCategory.class)
public class QNameTypeEditorTest
{
/** The location of the Spring context file used by this test. */
private static final String TEST_CONFIG_LOCATION = "classpath:org/alfresco/repo/policy/annotation/test-qname-type-editor-context.xml";
/** A list containing the standard Spring context files and the context file for this test. */
private static final String[] CONFIG_LOCATIONS = ArrayUtils.add(ApplicationContextHelper.CONFIG_LOCATIONS, TEST_CONFIG_LOCATION);
/** The Spring application context. */
private static ApplicationContext applicationContext = ApplicationContextHelper.getApplicationContext(CONFIG_LOCATIONS);
/** Check that loading a bean with a QName containing a reference to a namespace works. */
@Test
public void testPopulateBeanWithNamespace() throws Exception
{
QNameContainer qNameContainer = (QNameContainer) applicationContext.getBean("qNameContainerWithNamespace");
QName expectedQName = QName.createQName("http://www.alfresco.org/model/content/1.0", "namespacedName");
assertEquals("Loading String as QName failed.", expectedQName, qNameContainer.getQName());
}
/** Check loading a bean with a non-namespaced QName. */
@Test
public void testPopulateBeanWithoutNamespace() throws Exception
{
QNameContainer qNameContainer = (QNameContainer) applicationContext.getBean("qNameContainerNoNamespace");
QName expectedQName = QName.createQName("noNamespaceName");
assertEquals("Loading String as QName failed.", expectedQName, qNameContainer.getQName());
}
/** A POJO used to check the QName property behaviour. */
public static class QNameContainer
{
private QName qName;
/** Store a QName. */
public void setQName(QName qName)
{
this.qName = qName;
}
/** Retrieve the stored QName. */
public QName getQName()
{
return qName;
}
}
/**
* Clear up after all the tests have finished and dereference the application context to allow it to be garbage
* collected.
*/
@AfterClass
public static void tidyAfterTestClass()
{
ApplicationContextHelper.closeApplicationContext();
applicationContext = null;
}
}

View File

@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean name="qNameContainerWithNamespace" class="org.alfresco.repo.policy.annotation.QNameTypeEditorTest.QNameContainer">
<property name="qName" value="cm:namespacedName" />
</bean>
<bean name="qNameContainerNoNamespace" class="org.alfresco.repo.policy.annotation.QNameTypeEditorTest.QNameContainer">
<property name="qName" value="noNamespaceName" />
</bean>
</beans>