예제 #1
0
        public void Setup()
        {
            Config.Environment = Config.Test;
            _smtpClientStub = new StubSmtpClient();

            _notification = "Test notification for NotificationService testing.";
            _targetNotificationService = new NotificationService(_smtpClientStub);
        }
예제 #2
0
파일: Sync.cs 프로젝트: peterzhao/aft
        public Sync()
        {
            var mapperFactory = new MapperFactory();

            _errorHandler = new SyncErrorHandler(Config.ErrorToleranceThreshold);
            _salsaClient = new SalsaClient();
            _objectComparator = new SyncObjectComparator(_salsaClient);
            _salsaRepository = new SalsaRepository(_salsaClient, mapperFactory, _errorHandler, _objectComparator);
            _queueRepository = new QueueRepository(mapperFactory);
            _notificationService = new NotificationService(new EmailService());
            _syncSession = new SyncSession(_notificationService);
            _logTrimmer = new LogTrimmer();
        }
예제 #3
0
 public SyncSession(NotificationService notificationService)
 {
     _notificationService = notificationService;
     _jobs = new List<ISyncJob>();
     _db = new AftDbContext();
 }
예제 #4
0
 public void ShouldSendMailMessageUsingRealGmailCredentialsAndSslEnabled()
 {
     var notificationService = new NotificationService(new EmailService());
     notificationService.SendNotification(_notification);
 }