Skip to content

Commit

Permalink
[mekomsolutions#284] - Support "dispositions" domain
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoodrich committed Oct 25, 2024
1 parent e602766 commit 81b87d6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import java.io.File;

@OpenmrsProfile(modules = { "emrapi:2.1.0-SNAPSHOT-9.*" })
@OpenmrsProfile(modules = { "emrapi:2.0.0-SNAPSHOT-9.*" })
public class DispositionsLoader extends BaseFileLoader {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public DomainBaseModuleContextSensitiveTest() {
ModuleFactory.getStartedModulesMap().put(mod.getModuleId(), mod);
}
{
Module mod = new Module("", "emrapi", "", "", "", "2.1.0-SNAPSHOT");
Module mod = new Module("", "emrapi", "", "", "", "2.0.0");
mod.setFile(new File(""));
ModuleFactory.getStartedModulesMap().put(mod.getModuleId(), mod);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

public class DispositionsLoaderIntegrationTest extends DomainBaseModuleContextSensitiveTest {

Expand All @@ -25,4 +26,15 @@ public void load_shouldLoadDisposition() {
assertEquals(5, dispositionService.getDispositions().size());
}

@Test
public void load_shouldReloadOnMultipleLoads() {
loader.load();
// sanity check
assertEquals(5, dispositionService.getDispositions().size());

dispositionService.setDispositionConfig(null);
loader.load();
assertEquals(5, dispositionService.getDispositions().size());
}

}
1 change: 0 additions & 1 deletion readme/dispositions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dispositions/

#### Requirements
* The [emr-api](https://github.com/openmrs/openmrs-module-emrapi) version 2.0.0 or higher must be installed
* The OpenMRS version must be 2.2.1 or higher most be installed

#### Further examples:
Please look at the test configuration folder for dispositions file, see [here](../api/src/test/resources/testAppDataDir/configuration/dispositions/dispositionConfig.json).

0 comments on commit 81b87d6

Please sign in to comment.