public PopEmailIntegrationContext() { var transportMock = TransportMock.CreateWithoutStructureMapClear(typeof(ProjectEmailProfile).Assembly, new List <Assembly> { typeof(ExceptionThrownLocalMessage).Assembly }, new Assembly[] {}); ObjectFactory.Configure(x => x.For <TransportMock>().Use(transportMock)); ObjectFactory.Configure(x => x.For <PopEmailIntegrationContext>().Use(this)); Transport.On <RetrieveAllUsersQuery>().Reply(x => new UserQueryResult { QueryResultCount = 0 }); Transport.On <RetrieveAllProjectsQuery>().Reply(x => new ProjectQueryResult { QueryResultCount = 0 }); Transport.On <RetrieveAllRequestersQuery>().Reply(x => new RequesterQueryResult { QueryResultCount = 0 }); Transport.On <RetrieveAllMessageUidsQuery>().Reply(x => new MessageUidQueryResult { QueryResultCount = 0 }); Transport.On <RetrieveGlobalSettingQuery>().Reply(x => new GlobalSettingQueryResult { Dtos = new [] { new GlobalSettingDTO { SMTPSender = Guid.NewGuid().ToString() } }, QueryResultCount = 1 }); Profile = Transport.AddProfile("Profile_1", GetProfileSettings()); }
public void AddProfile(string profileName, TestRunImportPluginProfile settings) { CurrentProfile = Transport.AddProfile(profileName, settings); }