org.alfresco.repo.invitation
Class AbstractInvitationServiceImplTest

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.invitation.AbstractInvitationServiceImplTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ActivitiInvitationServiceImplTests, FullInvitationServiceImplTests, JbpmInvitationServiceImplTests

public abstract class AbstractInvitationServiceImplTest
extends BaseAlfrescoSpringTest

Unit tests of Invitation Service


Field Summary
protected  AuthenticationComponent authenticationComponent
           
protected  InvitationService invitationService
           
protected  InvitationServiceImpl invitationServiceImpl
           
static java.lang.String PERSON_FIRSTNAME
           
static java.lang.String PERSON_FIRSTNAME_SPACES
           
static java.lang.String PERSON_JOBTITLE
           
static java.lang.String PERSON_LASTNAME
           
static java.lang.String PERSON_LASTNAME_SPACES
           
static java.lang.String PERSON_ORG
           
protected static java.lang.String SITE_SHORT_NAME_BLUE
           
protected static java.lang.String SITE_SHORT_NAME_INVITE
           
protected static java.lang.String SITE_SHORT_NAME_RED
           
static java.lang.String USER_EVE
           
static java.lang.String USER_MANAGER
           
static java.lang.String USER_NOEMAIL
           
static java.lang.String USER_ONE
           
static java.lang.String USER_ONE_EMAIL
           
static java.lang.String USER_ONE_FIRSTNAME
           
static java.lang.String USER_ONE_LASTNAME
           
static java.lang.String USER_TWO
           
static java.lang.String USER_TWO_EMAIL
           
protected  WorkflowAdminServiceImpl workflowAdminService
           
 
Fields inherited from class org.alfresco.util.BaseAlfrescoSpringTest
actionService, authenticationService, contentService, nodeService, 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
AbstractInvitationServiceImplTest()
           
 
Method Summary
protected  void onSetUpInTransaction()
          Called during the transaction setup
protected  void onTearDownInTransaction()
           
 void testConfiguration()
           
 void testGetInvitation()
           
 void testModeratedApprove()
          Test the approval of a moderated invitation
 void testModeratedInvitation()
          Create a moderated invitation Get it Search for it Cancel it Create a moderated invitation Reject the invitation Create a moderated invitation Approve the invitation
 void testModeratedReject()
          Tests of Moderated Reject
 void testNominatedInvitationExistingUser()
          Create a Nominated Invitation (for existing user, USER_ONE) read it.
 void testNominatedInvitationNewUser()
          Test nominated user - new user
 void testNominatedInvitationNewUserReject()
          Test nominated user - new user who rejects invitation
 void testNominatedInvitationNewUserSameEmails()
          Test nominated user - new user Creates two separate users with two the same email address.
 void testNominatedInvitationNewUserWhitespace()
          Test nominated user - new user with whitespace in name.
 void testSearchInvitation()
          Test search invitation
 
Methods inherited from class org.alfresco.util.BaseAlfrescoSpringTest
createNode
 
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
 

Field Detail

authenticationComponent

protected AuthenticationComponent authenticationComponent

invitationService

protected InvitationService invitationService

invitationServiceImpl

protected InvitationServiceImpl invitationServiceImpl

workflowAdminService

protected WorkflowAdminServiceImpl workflowAdminService

SITE_SHORT_NAME_INVITE

protected static final java.lang.String SITE_SHORT_NAME_INVITE
See Also:
Constant Field Values

SITE_SHORT_NAME_RED

protected static final java.lang.String SITE_SHORT_NAME_RED
See Also:
Constant Field Values

SITE_SHORT_NAME_BLUE

protected static final java.lang.String SITE_SHORT_NAME_BLUE
See Also:
Constant Field Values

PERSON_FIRSTNAME

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

PERSON_FIRSTNAME_SPACES

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

PERSON_LASTNAME

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

PERSON_LASTNAME_SPACES

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

PERSON_JOBTITLE

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

PERSON_ORG

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

USER_MANAGER

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

USER_ONE

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

USER_TWO

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

USER_EVE

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

USER_NOEMAIL

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

USER_ONE_FIRSTNAME

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

USER_ONE_LASTNAME

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

USER_ONE_EMAIL

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

USER_TWO_EMAIL

public static final java.lang.String USER_TWO_EMAIL
See Also:
Constant Field Values
Constructor Detail

AbstractInvitationServiceImplTest

public AbstractInvitationServiceImplTest()
Method Detail

onSetUpInTransaction

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

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

onTearDownInTransaction

protected void onTearDownInTransaction()
                                throws java.lang.Exception
Overrides:
onTearDownInTransaction in class BaseAlfrescoSpringTest
Throws:
java.lang.Exception

testConfiguration

public void testConfiguration()

testNominatedInvitationNewUser

public void testNominatedInvitationNewUser()
                                    throws java.lang.Exception
Test nominated user - new user

Throws:
java.lang.Exception

testNominatedInvitationNewUserReject

public void testNominatedInvitationNewUserReject()
                                          throws java.lang.Exception
Test nominated user - new user who rejects invitation

Throws:
java.lang.Exception

testNominatedInvitationNewUserSameEmails

public void testNominatedInvitationNewUserSameEmails()
                                              throws java.lang.Exception
Test nominated user - new user Creates two separate users with two the same email address.

Throws:
java.lang.Exception

testNominatedInvitationNewUserWhitespace

public void testNominatedInvitationNewUserWhitespace()
                                              throws java.lang.Exception
Test nominated user - new user with whitespace in name. Related to ETHREEOH-3030.

Throws:
java.lang.Exception

testNominatedInvitationExistingUser

public void testNominatedInvitationExistingUser()
                                         throws java.lang.Exception
Create a Nominated Invitation (for existing user, USER_ONE) read it. search for it cancel it search for it again (and fail to find it) Create a Nominated Invitation read it. search for it reject it Create a Nominated Invitation read it. accept it

Throws:
java.lang.Exception

testModeratedInvitation

public void testModeratedInvitation()
Create a moderated invitation Get it Search for it Cancel it Create a moderated invitation Reject the invitation Create a moderated invitation Approve the invitation


testModeratedApprove

public void testModeratedApprove()
Test the approval of a moderated invitation


testModeratedReject

public void testModeratedReject()
Tests of Moderated Reject


testSearchInvitation

public void testSearchInvitation()
Test search invitation


testGetInvitation

public void testGetInvitation()


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