Пример #1
0
 public IRecordsSynchronizer <TChildRecord> AddChild <TChildRecord, TChildKey>(
     Expression <Func <TRecord, IList <TChildRecord> > > childRecordsSelector,
     Func <TChildRecord, TChildKey> childRecordKeySelector)
     where TChildRecord : class
 {
     return(AddChild(childRecordsSelector,
                     RecordsSynchronizerFactory <TChildRecord> .RecordsComparer(childRecordKeySelector),
                     RecordsSynchronizerFactory <TChildRecord> .PropertiesProvider()));
 }
Пример #2
0
        public void Setup()
        {
            _currentRecords     = Substitute.For <IList <IMockRecord> >();
            _propertiesProvider = Substitute.For <IPropertiesProvider <IMockRecord> >();


            _recordsComparer     = Substitute.For <IRecordsComparer <IMockRecord> >();
            _recordsSynchronizer = RecordsSynchronizerFactory <IMockRecord> .Create(_recordsComparer, _propertiesProvider);
        }
Пример #3
0
 private void InitRecordsComparer(Func <MockRecord, bool> filter = null)
 {
     _recordsComparer = RecordsSynchronizerFactory <MockRecord> .RecordsComparer(record => new { record.Key1, record.Key2 }, filter);
 }