public void BackupRestore_A_Backup02StreamingTest() { FbStreamingBackup backupSvc = new FbStreamingBackup(); var backupLength = default(long); using (var ms = new MemoryStream()) { backupSvc.ConnectionString = this.BuildServicesConnectionString(); backupSvc.Options = FbBackupFlags.IgnoreLimbo; backupSvc.OutputStream = ms; backupSvc.ServiceOutput += new ServiceOutputEventHandler(ServiceOutput); backupSvc.Execute(); backupLength = ms.Length; } Assert.Greater(backupLength, 0); // suppose the "previous" test is done and the file is somewhere var backup = GetBackupRestoreFullPath(); Assert.IsNotNull(backup); Assert.AreEqual(new FileInfo(backup).Length, backupLength); }
public void StreamingBackupRestoreTest_BackupPart(MemoryStream buffer) { FbStreamingBackup backupSvc = new FbStreamingBackup(); backupSvc.ConnectionString = BuildServicesConnectionString(FbServerType); backupSvc.Options = FbBackupFlags.IgnoreLimbo; backupSvc.OutputStream = buffer; backupSvc.ServiceOutput += new EventHandler<ServiceOutputEventArgs>(ServiceOutput); backupSvc.Execute(); }