コード例 #1
0
ファイル: MapperFactoryTests.cs プロジェクト: peterzhao/aft
 public void ShouldGetMapperForSupporter()
 {
     var mapper  = new MapperFactory().GetMapper("supporter");
     Assert.IsTrue(mapper.Mappings.Any(m => m.SalsaField == "Email"));
     Assert.IsTrue(mapper.Mappings.Any(m => m.SalsaField == "First_Name"));
     Assert.IsTrue(mapper.Mappings.Any(m => m.SalsaField == "Last_Name"));
 }
コード例 #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();
        }