@Test public void shouldLeaveACopyOfOriginalStoreFilesInBackupDirectory() throws IOException { File workingDirectory = new File( "target/" + StoreUpgraderTestIT.class.getSimpleName() + "shouldLeaveACopyOfOriginalStoreFilesInBackupDirectory"); MigrationTestUtils.prepareSampleLegacyDatabase(workingDirectory); newUpgrader( alwaysAllowed(), new StoreMigrator(new SilentMigrationProgressMonitor()), new DatabaseFiles()) .attemptUpgrade(new File(workingDirectory, NeoStore.DEFAULT_NAME).getPath()); verifyFilesHaveSameContent( MigrationTestUtils.findOldFormatStoreDirectory(), new File(workingDirectory, "upgrade_backup")); }
@Before public void prepareDirectory() throws IOException { workingDirectory = MigrationTestUtils.findOldFormatStoreDirectory(); }