@Test void upgradeToLastVersionShouldNotThrowWhenVersionIsUpToDate() throws InterruptedException { when(schemaVersionDAO.getCurrentSchemaVersion()).thenReturn(Mono.just(Optional.of(LATEST_VERSION))); assertThat(testee.upgradeToLastVersion().run()) .isEqualTo(Task.Result.COMPLETED); }
public Task upgradeToLastVersion() { return upgradeToVersion(latestVersion); }
CassandraMigrationService { public Task upgradeToLastVersion() { return upgradeToVersion(latestVersion); } }
CassandraMigrationService { public Task upgradeToLastVersion() { return upgradeToVersion(latestVersion); } @Inject  CassandraMigrationService(CassandraSchemaVersionDAO schemaVersionDAO, CassandraSchemaTransitions transitions,
                                     MigrationTask.Factory factory, @Named(LATEST_VERSION) SchemaVersion latestVersion); }
CassandraMigrationService { public Task upgradeToLastVersion() { return upgradeToVersion(latestVersion); } @Inject  CassandraMigrationService(CassandraSchemaVersionDAO schemaVersionDAO, CassandraSchemaTransitions transitions,
                                     MigrationTask.Factory factory, @Named(LATEST_VERSION) SchemaVersion latestVersion); Optional<SchemaVersion> getCurrentVersion(); Optional<SchemaVersion> getLatestVersion(); Task upgradeToVersion(SchemaVersion target); Task upgradeToLastVersion(); }
CassandraMigrationService { public Task upgradeToLastVersion() { return upgradeToVersion(latestVersion); } @Inject  CassandraMigrationService(CassandraSchemaVersionDAO schemaVersionDAO, CassandraSchemaTransitions transitions,
                                     MigrationTask.Factory factory, @Named(LATEST_VERSION) SchemaVersion latestVersion); Optional<SchemaVersion> getCurrentVersion(); Optional<SchemaVersion> getLatestVersion(); Task upgradeToVersion(SchemaVersion target); Task upgradeToLastVersion(); static final String LATEST_VERSION; }