org.alfresco.repo.site
Class SiteServiceImplTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.springframework.test.AbstractTransactionalSpringContextTests
                              extended by org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
                                  extended by org.alfresco.util.BaseSpringTest
                                      extended by org.alfresco.util.BaseAlfrescoSpringTest
                                          extended by org.alfresco.repo.site.SiteServiceImplTest
All Implemented Interfaces:
junit.framework.Test

public class SiteServiceImplTest
extends BaseAlfrescoSpringTest

Site service implementation unit test


Field Summary
 
Fields inherited from class org.alfresco.util.BaseAlfrescoSpringTest
actionService, authenticationService, contentService, rootNodeRef, storeRef, transactionService
 
Fields inherited from class org.alfresco.util.BaseSpringTest
sessionFactory
 
Fields inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
jdbcTemplate
 
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
transactionDefinition, transactionManager, transactionStatus
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
 
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests
applicationContext
 
Fields inherited from class org.springframework.test.ConditionalTestCase
logger
 
Constructor Summary
SiteServiceImplTest()
           
 
Method Summary
protected  void onSetUpInTransaction()
          Called during the transaction setup
 void testALF_1017_nonSitesInSitesSpace()
          ALF-1017 - Non sites in the Sites Space container shouldn't break the listing methods
 void testALF_3200()
          ALF-3200 You shouldn't be able to rename a Site using the normal node service type operations, because the relationship between a site and its authorities is based on a pattern that uses the site name.
 void testALF_5556()
           
 void testALF8036_PermissionsAfterCopyingFolderBetweenSites()
           
 void testALFCOM_3109()
          Create a site with a USER manager.
 void testALFCOM_3111()
          Create a site with a USER manager.
 void testConfigurableSitePublicGroup()
          This method tests https://issues.alfresco.com/jira/browse/ALF-3785 which allows 'public' sites to be only visible to members of a configured group, by default EVERYONE.
 void testContainer()
           
 void testCreateSite()
          This test method ensures that public sites can be created and that their site info is correct.
 void testCustomSiteProperties()
           
 void testCustomSiteType()
          Creates a site with a custom type, and ensures that it behaves correctly.
 void testDeleteSite()
           
 void testETHREEOH_1268()
          Create a private site.
 void testETHREEOH_15()
          This method tests that admin and system users can set site membership for a site of which they are not SiteManagers.
 void testETHREEOH_2133()
          Test for duplicate site exception where the duplicate is a private site.
 void testfindSitesWithWildcardTitles()
          This test method ensures that searches with wildcards work as they should
 void testGetSite()
           
 void testGroupMembership()
           
 void testIsPublic()
           
 void testJoinLeave()
           
 void testJSAPI()
           
 void testListSites()
          Test listSite and findSites methods.
 void testMembership()
           
 void testPermissionsAfterMovingFolderBetweenSites()
           
 void testSiteGetRoles()
           
 void testSiteVisibility()
          Tests the visibility of a site See https://issues.alfresco.com/jira/browse/JAWS-291
 void testUpdateSite()
           
 
Methods inherited from class org.alfresco.util.BaseAlfrescoSpringTest
createNode, onTearDownInTransaction
 
Methods inherited from class org.alfresco.util.BaseSpringTest
flushAndClear, getConfigLocations, getSession, loadContext, setSessionFactory
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, isDefaultRollback, isRollback, onSetUp, onSetUpBeforeTransaction, onTearDown, onTearDownAfterTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty
 
Methods inherited from class org.springframework.test.ConditionalTestCase
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBare
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, 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
 

Constructor Detail

SiteServiceImplTest

public SiteServiceImplTest()
Method Detail

onSetUpInTransaction

protected void onSetUpInTransaction()
                             throws java.lang.Exception
Called during the transaction setup

Overrides:
onSetUpInTransaction in class BaseAlfrescoSpringTest
Throws:
java.lang.Exception

testCreateSite

public void testCreateSite()
                    throws java.lang.Exception
This test method ensures that public sites can be created and that their site info is correct. It also tests that a duplicate site cannot be created.

Throws:
java.lang.Exception

testETHREEOH_2133

public void testETHREEOH_2133()
                       throws java.lang.Exception
Test for duplicate site exception where the duplicate is a private site.

Throws:
java.lang.Exception

testConfigurableSitePublicGroup

public void testConfigurableSitePublicGroup()
                                     throws java.lang.Exception
This method tests https://issues.alfresco.com/jira/browse/ALF-3785 which allows 'public' sites to be only visible to members of a configured group, by default EVERYONE.

Throws:
java.lang.Exception
Since:
3.4

testETHREEOH_15

public void testETHREEOH_15()
                     throws java.lang.Exception
This method tests that admin and system users can set site membership for a site of which they are not SiteManagers.

Throws:
java.lang.Exception

testListSites

public void testListSites()
                   throws java.lang.Exception
Test listSite and findSites methods.

Note that SiteService#findSites(String, int) offers eventually consistent results and therefore may exhibit changed behaviour if Lucene is switched off or is replaced by SOLR. SiteService.listSites(List, List, org.alfresco.query.PagingRequest) and the other listSites methods should offer consistent, accurate result sets.

Throws:
java.lang.Exception

testfindSitesWithWildcardTitles

public void testfindSitesWithWildcardTitles()
                                     throws java.lang.Exception
This test method ensures that searches with wildcards work as they should

Throws:
java.lang.Exception

testGetSite

public void testGetSite()

testUpdateSite

public void testUpdateSite()

testDeleteSite

public void testDeleteSite()

testIsPublic

public void testIsPublic()

testMembership

public void testMembership()

testJoinLeave

public void testJoinLeave()

testContainer

public void testContainer()

testSiteGetRoles

public void testSiteGetRoles()

testCustomSiteProperties

public void testCustomSiteProperties()

testCustomSiteType

public void testCustomSiteType()
Creates a site with a custom type, and ensures that it behaves correctly.


testGroupMembership

public void testGroupMembership()

testSiteVisibility

public void testSiteVisibility()
Tests the visibility of a site See https://issues.alfresco.com/jira/browse/JAWS-291


testALFCOM_3109

public void testALFCOM_3109()
Create a site with a USER manager. Add Group manager membership. Lower User membership - should be O.K. because of Group Membership Lower Group membership - should be prevented (last manager) Reset User membership to Manager Lower Group membership - should be O.K. because of User Membership Lower User membership - should be prevented (last manager)


testALFCOM_3111

public void testALFCOM_3111()
Create a site with a USER manager. Add Group manager membership. Remove User membership - should be O.K. because of Group Membership Remove Group membership - should be prevented (last manager) Add User membership to Manager Remove Group membership - should be O.K. because of User Membership Remove User membership - should be prevented (last manager)


testETHREEOH_1268

public void testETHREEOH_1268()
Create a private site. Attempt to access a private site by someone that is not a consumer of that site.


testALF_3200

public void testALF_3200()
                  throws java.lang.Exception
ALF-3200 You shouldn't be able to rename a Site using the normal node service type operations, because the relationship between a site and its authorities is based on a pattern that uses the site name. However, you are free to change a site's display name.

Throws:
java.lang.Exception

testALF_5556

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

testALF8036_PermissionsAfterCopyingFolderBetweenSites

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

testALF_1017_nonSitesInSitesSpace

public void testALF_1017_nonSitesInSitesSpace()
                                       throws java.lang.Exception
ALF-1017 - Non sites in the Sites Space container shouldn't break the listing methods

Throws:
java.lang.Exception

testPermissionsAfterMovingFolderBetweenSites

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

testJSAPI

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


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