public void GlobalSetup() { var config = new XDoc("config"); var builder = new ContainerBuilder(); _smtpClientFactory = new SmtpClientFactoryMock(); builder.Register(c => _smtpClientFactory).As <ISmtpClientFactory>().ServiceScoped(); _hostInfo = DreamTestHelper.CreateRandomPortHost(config, builder.Build()); _emailService = DreamTestHelper.CreateService( _hostInfo, "sid://mindtouch.com/2009/01/dream/email", "email", new XDoc("config") .Elem("apikey", "servicekey") .Elem("smtp-host", DEFAULT_HOST) ); _plug = _emailService.WithInternalKey().AtLocalHost; }
public void GlobalSetup() { var config = new XDoc("config"); var builder = new ContainerBuilder(); _smtpClientFactory = new SmtpClientFactoryMock(); builder.Register(c => _smtpClientFactory).As<ISmtpClientFactory>().ServiceScoped(); _hostInfo = DreamTestHelper.CreateRandomPortHost(config, builder.Build(ContainerBuildOptions.Default)); _emailService = DreamTestHelper.CreateService( _hostInfo, "sid://mindtouch.com/2009/01/dream/email", "email", new XDoc("config") .Elem("apikey", "servicekey") .Elem("smtp-host", DEFAULT_HOST) ); _plug = _emailService.WithInternalKey().AtLocalHost; }