forked from openmrs/openmrs-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TRUNK-5817 add wrapper for the DatabaseUpdater class to support mocki…
…ng without PowerMock
- Loading branch information
1 parent
37465a3
commit 0a5f9fe
Showing
4 changed files
with
80 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
web/src/main/java/org/openmrs/web/filter/update/DatabaseUpdaterWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, | ||
* v. 2.0. If a copy of the MPL was not distributed with this file, You can | ||
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under | ||
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license. | ||
* | ||
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS | ||
* graphic logo is a trademark of OpenMRS Inc. | ||
*/ | ||
package org.openmrs.web.filter.update; | ||
|
||
import java.util.List; | ||
import org.openmrs.liquibase.LiquibaseProvider; | ||
import org.openmrs.util.DatabaseUpdater; | ||
|
||
public class DatabaseUpdaterWrapper { | ||
public List<DatabaseUpdater.OpenMRSChangeSet> getUnrunDatabaseChanges( LiquibaseProvider liquibaseProvider) throws Exception { | ||
return DatabaseUpdater.getUnrunDatabaseChanges( liquibaseProvider ); | ||
} | ||
|
||
public boolean isLocked() { | ||
return DatabaseUpdater.isLocked(); | ||
} | ||
|
||
public boolean updatesRequired() throws Exception { | ||
return DatabaseUpdater.updatesRequired(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters