public GenericSyncServiceTwoWayTests()
 {
     _localProvider = Substitute.For<ISynchronisationProvider<SyncClass, int>>();
     _remoteProvider = Substitute.For<ISynchronisationProvider<SyncClass, int>>();
     _settings = Substitute.For<ISyncSettings>();
     _settings.LastSync = DateTime.Today;
     _syncService = new GenericSynchronisationService<SyncClass, int>(c => c.Id, _localProvider, _remoteProvider, _settings, SyncDirection.TwoWay);
 }
Exemplo n.º 2
0
 public GenericSyncServiceTwoWayTests()
 {
     _localProvider     = Substitute.For <ISynchronisationProvider <SyncClass, int> >();
     _remoteProvider    = Substitute.For <ISynchronisationProvider <SyncClass, int> >();
     _settings          = Substitute.For <ISyncSettings>();
     _settings.LastSync = DateTime.Today;
     _syncService       = new GenericSynchronisationService <SyncClass, int>(c => c.Id, _localProvider, _remoteProvider, _settings, SyncDirection.TwoWay);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GenericSynchronisationService&lt;TType, TKey&gt;"/> class.
 /// </summary>
 /// <param name="keySelector">The key selector.</param>
 /// <param name="localProvider">The local provider.</param>
 /// <param name="remoteProvider">The remote provider.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="syncDirection">The sync direction.</param>
 public GenericSynchronisationService(
     Func <TType, TKey> keySelector,
     ISynchronisationProvider <TType, TKey> localProvider,
     ISynchronisationProvider <TType, TKey> remoteProvider,
     ISyncSettings settings,
     SyncDirection syncDirection)
 {
     _keySelector    = keySelector;
     _localProvider  = localProvider;
     _remoteProvider = remoteProvider;
     _settings       = settings;
     _syncDirection  = syncDirection;
 }