Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup()
        public virtual void Setup()
        {
            _desiredBackupLayout          = TestDirectory.databaseLayout("desiredBackupLayout");
            _reportDir                    = TestDirectory.directory("reportDir").toPath();
            _availableFreshBackupLocation = TestDirectory.directory("availableFreshBackupLocation").toPath();
            Path availableOldBackupLocation = TestDirectory.directory("availableOldBackupLocation").toPath();

            when(_outsideWorld.fileSystem()).thenReturn(_fileSystemAbstraction);
            when(_backupCopyService.findAnAvailableLocationForNewFullBackup(any())).thenReturn(_availableFreshBackupLocation);
            when(_backupCopyService.findNewBackupLocationForBrokenExisting(any())).thenReturn(availableOldBackupLocation);
            when(_backupStrategyImplementation.performFullBackup(any(), any(), any())).thenReturn(_success);
            when(_logProvider.getLog(( Type )any())).thenReturn(_log);

            _subject = new BackupStrategyWrapper(_backupStrategyImplementation, _backupCopyService, _pageCache, _config, _backupRecoveryService, _logProvider);
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void renameTemporaryBackupToExpected(java.nio.file.Path temporaryFullBackupLocation, java.nio.file.Path userSpecifiedBackupLocation) throws java.io.IOException
        private void RenameTemporaryBackupToExpected(Path temporaryFullBackupLocation, Path userSpecifiedBackupLocation)
        {
            Path newBackupLocationForPreExistingBackup = _backupCopyService.findNewBackupLocationForBrokenExisting(userSpecifiedBackupLocation);

            _backupCopyService.moveBackupLocation(userSpecifiedBackupLocation, newBackupLocationForPreExistingBackup);
            _backupCopyService.moveBackupLocation(temporaryFullBackupLocation, userSpecifiedBackupLocation);
        }