Skip to content

Commit

Permalink
Merge pull request #588 from opensrp/master-refactor-practitioner-sea…
Browse files Browse the repository at this point in the history
…rch-bean

refactor practitioner search bean
  • Loading branch information
hilpitome authored Jul 1, 2022
2 parents 63f78d0 + 9539c38 commit ca13388
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<artifactId>opensrp-server-core</artifactId>
<packaging>jar</packaging>
<version>3.2.3-SNAPSHOT</version>
<version>3.2.4-SNAPSHOT</version>
<name>opensrp-server-core</name>
<description>OpenSRP Server Core module</description>
<url>https://github.com/OpenSRP/opensrp-server-core</url>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/opensrp/search/BaseSearchBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum OrderByType {
}

public enum FieldName {
id
id, server_version
}

private Integer pageNumber = 0;
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/org/opensrp/search/PractitionerSearchBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,4 @@
public class PractitionerSearchBean extends BaseSearchBean {

private Long serverVersion;

public Long getServerVersion() {
return serverVersion;
}

public void setServerVersion(Long serverVersion) {
this.serverVersion = serverVersion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -384,4 +384,17 @@ public void testCountAllPractitioners() {
practitionerRepository.add(practitioner1);
assertEquals(1, practitionerRepository.countAllPractitioners());
}

@Test
public void testGetPractitionersByIdentifier() {
Practitioner expectedPractitioner = initTestPractitioner1();
practitionerRepository.add(expectedPractitioner);
Practitioner actualPractitioner = practitionerRepository.getPractitionerByIdentifier(expectedPractitioner.getIdentifier());
assertNotNull(actualPractitioner);
assertEquals(expectedPractitioner.getIdentifier(),actualPractitioner.getIdentifier());
assertEquals(expectedPractitioner.getName(),actualPractitioner.getName());
assertEquals(expectedPractitioner.getUserId(),actualPractitioner.getUserId());
assertEquals(expectedPractitioner.getUsername(),actualPractitioner.getUsername());
}

}

0 comments on commit ca13388

Please sign in to comment.