private static void CheckStatus(SyncState sync, SyncState.SyncTypes expectedType, long expectedId,
                                 SyncState.SyncStatusTypes expectedStatus,
                                 int expectedProgress, int expectedSize)
 {
     Assert.AreEqual(expectedType, sync.Type, "Wrong type");
     Assert.AreEqual(expectedId, sync.Id, "Wrong id");
     Assert.AreEqual(expectedStatus, sync.Status, "Wrong status");
     Assert.AreEqual(expectedProgress, sync.Progress, "Wrong progress");
     Assert.AreEqual(expectedSize, sync.TotalSize, "Wrong total size");
 }
Exemplo n.º 2
0
 private void UpdateSync(SyncState sync, SyncState.SyncStatusTypes status, int progress,
                         Action <SyncState> callback)
 {
     if (sync == null)
     {
         return;
     }
     sync.Status = status;
     if (progress != SyncDownTarget.Unchanged)
     {
         sync.Progress = progress;
     }
     sync.Save(_smartStore);
     if (callback != null)
     {
         callback(sync);
     }
 }