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())); }
public void Setup() { _currentRecords = Substitute.For <IList <IMockRecord> >(); _propertiesProvider = Substitute.For <IPropertiesProvider <IMockRecord> >(); _recordsComparer = Substitute.For <IRecordsComparer <IMockRecord> >(); _recordsSynchronizer = RecordsSynchronizerFactory <IMockRecord> .Create(_recordsComparer, _propertiesProvider); }
private void InitRecordsComparer(Func <MockRecord, bool> filter = null) { _recordsComparer = RecordsSynchronizerFactory <MockRecord> .RecordsComparer(record => new { record.Key1, record.Key2 }, filter); }