Skip to content

Commit

Permalink
Minor additions for: getProviders(String query, Integer start, Integer
Browse files Browse the repository at this point in the history
length, Map<ProviderAttributeType, Object> attributes) should allow the
option to include or not include retired providers - TRUNK-3170
  • Loading branch information
dkayiwa committed Mar 4, 2013
1 parent 5ef22ec commit fe98f3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/src/main/java/org/openmrs/api/ProviderService.java
Expand Up @@ -174,7 +174,7 @@ public List<Provider> getProviders(String query, Integer start, Integer length,
* @should get all visits with given attribute values
* @should not find any visits if none have given attribute values
* @should return all providers if query is empty
* @should not return retired providers
* @should return retired providers
*/
@Authorized( { PrivilegeConstants.VIEW_PROVIDERS })
public List<Provider> getProviders(String query, Integer start, Integer length,
Expand Down
6 changes: 3 additions & 3 deletions api/src/test/java/org/openmrs/api/ProviderServiceTest.java
Expand Up @@ -408,7 +408,7 @@ public void getProviders_shouldNotFindAnyProvidersIfNoneHaveGivenAttributeValues

/**
* @see ProviderService#getProviders(String, Integer, Integer, java.util.Map)
* @verifies finds retired providers
* @verifies finds retired providers by default
*/
@Test
public void getProviders_shouldReturnRetiredProvidersByDefault() throws Exception {
Expand All @@ -418,10 +418,10 @@ public void getProviders_shouldReturnRetiredProvidersByDefault() throws Exceptio

/**
* @see ProviderService#getProviders(String, Integer, Integer, java.util.Map, boolean)
* @verifies does not find retired providers
* @verifies does not find retired providers if includeRetired is false
*/
@Test
public void getProviders_shouldNotReturnRetiredProvidersIfIncludeRetiredFalse() throws Exception {
public void getProviders_shouldNotReturnRetiredProvidersIfIncludeRetiredIsFalse() throws Exception {
List<Provider> providers = service.getProviders(null, null, null, null, false);
Assert.assertEquals(7, providers.size());
}
Expand Down

0 comments on commit fe98f3a

Please sign in to comment.