Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vaccine outreach column populated #273

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion opensrp-child/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ dependencies {
exclude group: 'com.android.support', module: 'appcompat-v7'
}

api('org.smartregister:opensrp-client-immunization:4.0.0-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-immunization:4.0.1-SNAPSHOT@aar') {
transitive = true
exclude group: 'org.smartregister', module: 'opensrp-client-core'
exclude group: 'org.smartregister', module: 'opensrp-client-native-form'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public static void addVaccine(VaccineRepository vaccineRepository, Vaccine vacci
String providerId = allSharedPreferences.fetchRegisteredANM();
vaccine.setTeam(allSharedPreferences.fetchDefaultTeam(providerId));
vaccine.setTeamId(allSharedPreferences.fetchDefaultTeamId(providerId));

vaccine.setOutreach(vaccine.getLocationId().equals(allSharedPreferences.fetchDefaultLocalityId(providerId))? 0 : 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add null check that defaults to 0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ndegwamartin could you please change -Xmx4096m because i dont have permission to change the Ci.yml file
cc: @ellykits @dubdabasoduba

vaccine.setName(vaccine.getName().trim());
// Add the vaccine
vaccineRepository.add(vaccine);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ public void getCombinedVaccineWithNonNullArgument() {
public void addVaccineWithVaccineRepositoryOrVaccineNotNull() {
Vaccine vaccine = new Vaccine();
vaccine.setName("testvaccine");
vaccine.setLocationId("location1");
vaccine.setOutreach(1);
Assert.assertNotNull(vaccine);
Utils.addVaccine(vaccineRepository, vaccine);
Mockito.verify(vaccineRepository, Mockito.times(1)).add(vaccineArgumentCaptor.capture());
Assert.assertEquals(vaccine, vaccineArgumentCaptor.getValue());
Mockito.verify(vaccineRepository, Mockito.times(1)).add(vaccine);
}

@Test
Expand Down