Exemple #1
0
        public async Task Cannot_Retrigger_Sync()
        {
            await _syncStateService.StartSyncAsync();

            await _syncStateService.UpdateSyncStateAsync();

            _syncStateService.SyncState.ShouldBe(SyncState.Finished);
        }
        public async Task StartSync_CurrentSyncStateIsNotUnInitialized_Test()
        {
            _syncStateProvider.SetSyncTarget(10);

            _peerPool.TryAddPeer(CreatePeer(15));
            _peerPool.TryAddPeer(CreatePeer(16));

            await _syncStateService.StartSyncAsync();

            _syncStateService.GetCurrentSyncTarget().ShouldBe(10);
        }
 public async Task HandleEventAsync(NetworkInitializedEvent eventData)
 {
     await _syncStateService.StartSyncAsync();
 }