Fix InvitationServiceImplTest

- Also switch off inbound email server by default

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19274 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2010-03-13 12:34:20 +00:00
parent 0d09ec9b64
commit eb1180f1ec
2 changed files with 5 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ import java.util.List;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.executer.MailActionExecuter;
import org.alfresco.repo.management.subsystems.ApplicationContextFactory;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.site.SiteModel;
import org.alfresco.service.cmr.invitation.Invitation;
@@ -82,7 +83,8 @@ public class InvitationServiceImplTest extends BaseAlfrescoSpringTest
// TODO MER 20/11/2009 Bodge - turn off email sending to prevent errors
// during unit testing
// (or sending out email by accident from tests)
MailActionExecuter mail = (MailActionExecuter) this.applicationContext.getBean("mail");
MailActionExecuter mail = (MailActionExecuter) ((ApplicationContextFactory) this.applicationContext
.getBean("OutboundSMTP")).getApplicationContext().getBean("mail");
mail.setTestMode(true);
createPerson(USER_MANAGER, USER_MANAGER + "@alfrescotesting.com", PERSON_FIRSTNAME, PERSON_LASTNAME);