コード例 #1
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();
        }
コード例 #2
0
ファイル: QueueRepositoryTests.cs プロジェクト: peterzhao/aft
        public void SetUp()
        {
            Config.Environment = Config.Test;
            _mapperFactoryMock = new Mock<IMapperFactory>();
            var mapping1 = new FieldMapping {AftField = "First_Name", SalsaField = "First_Name", DataType = DataType.String};
            var mapping2 = new FieldMapping {AftField = "Last_Name", SalsaField = "Last_Name", DataType = DataType.String};
            var mapping3 = new FieldMapping { AftField = "ProcessedDate", DataType = DataType.DateTime };
            var mapping4 = new FieldMapping {AftField = "Email",  DataType = DataType.String};
            var mapping5 = new FieldMapping {AftField = "PE_Pub",  DataType = DataType.Boolean};
            _mapper = new Mapper(ObjectType, new List<FieldMapping>{mapping1, mapping2, mapping3, mapping4, mapping5});
            _repository = new QueueRepository(_mapperFactoryMock.Object);
            _syncObject = new SyncObject(ObjectType);

            TestUtils.ClearAllQueues();
        }