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

Fixes app crashes reported on Android Version 5 #267

Closed
wants to merge 11 commits into from
2 changes: 1 addition & 1 deletion opensrp-child/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ dependencies {


implementation 'com.google.guava:guava:29.0-android'
implementation 'id.zelory:compressor:2.1.0'
implementation 'id.zelory:compressor:2.1.1'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation "androidx.constraintlayout:constraintlayout:2.0.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ public void renderProfileWidget(Map<String, String> childDetails) {
TextView profilename = findViewById(R.id.name);
TextView profileOpenSrpId = findViewById(R.id.idforclient);
TextView profileage = findViewById(R.id.ageforclient);
TextView systemOfRegistration = findViewById(R.id.system_of_registration);
String name = "";
String childId = "";
String dobString;
Expand All @@ -445,6 +446,11 @@ public void renderProfileWidget(Map<String, String> childDetails) {
if (StringUtils.isNotBlank(childId)) {
childId = childId.replace("-", "");
}
String systemOfRegistrationText = Utils.getValue(childDetails,Constants.Client.SYSTEM_OF_REGISTRATION, false);
if(systemOfRegistrationText != null && !systemOfRegistrationText.equals(""))
systemOfRegistration.setText(systemOfRegistrationText);
else
systemOfRegistration.setVisibility(View.GONE);
dobString = Utils.getValue(childDetails, Constants.KEY.DOB, false);
Date dob = Utils.dobStringToDate(dobString);
if (dob != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public abstract class BaseChildImmunizationActivity extends BaseChildActivity
private TextView ageTV;
private TextView nameTV;
private TextView childIdTV;
private TextView systemOfRegistrationTV;
private LinearLayout vaccineGroupCanvasLL;
private LinearLayout profileNamelayout;
private LinearLayout serviceGroupCanvasLL;
Expand Down Expand Up @@ -249,6 +250,7 @@ private void setUpViews() {
profileImageIV = findViewById(R.id.profile_image_iv);
nameTV = findViewById(R.id.name_tv);
childIdTV = findViewById(R.id.child_id_tv);
systemOfRegistrationTV = findViewById(R.id.system_of_registration);
floatingActionButton = findViewById(R.id.fab);
someLayout = findViewById(R.id.content_base_inner);
nextAppointmentDateView = findViewById(R.id.next_appointment_date);
Expand Down Expand Up @@ -403,6 +405,7 @@ public void updateViews() {
((TextView) toolbar.findViewById(R.id.title)).setText(getActivityTitle());//Called differently Fixes weird bug

updateAgeViews();
updateSystemOfRegistration();
updateChildIdViews();
updateNextAppointmentDateView();

Expand Down Expand Up @@ -488,6 +491,12 @@ protected void updateChildIdViews() {
Utils.startAsyncTask(new GetSiblingsTask(childDetails, this), null);
}

private void updateSystemOfRegistration()
{
String systemOfRegistration = org.smartregister.util.Utils.getValue(childDetails.getColumnmaps(), Constants.Client.SYSTEM_OF_REGISTRATION, false);
systemOfRegistrationTV.setText(systemOfRegistration!= null ? systemOfRegistration : "");
}

private void updateNextAppointmentDateView() {
if (registerClickables != null && !TextUtils.isEmpty(registerClickables.getNextAppointmentDate())) {
((View) nextAppointmentDateView.getParent()).setVisibility(View.VISIBLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class ChildMotherDetailModel implements Comparable<ChildMotherDetailModel
private String motherFirstName;
private String motherLastName;
private String inActive;
private String systemOfRegistration;
private String lostFollowUp;
private JSONObject childJson;
private JSONObject motherJson;
Expand All @@ -34,7 +35,7 @@ public ChildMotherDetailModel(JSONObject childJson, JSONObject motherJson) {
public Object[] getColumnValuesFromJson() {
return new Object[]{
getChildBaseEntityId(), getRelationalId(), getMotherBaseEntityId(), getFatherBaseEntityId(), getFirstName(), getLastName(), getGender(), getDateOfBirth(),
getZeirId(), getMotherFirstName(), getMotherLastName(), getInActive(), getLostFollowUp()
getZeirId(), getMotherFirstName(), getMotherLastName(), getInActive(), getLostFollowUp(), getSystemOfRegistration()
};
}

Expand All @@ -48,6 +49,7 @@ private void mapJsonToField() {
setDateOfBirth(getStringValue(Constants.Client.BIRTHDATE, true));
String motherRelationId = getRelationalId(Constants.KEY.MOTHER);
setRelationalId(motherRelationId);
setSystemOfRegistration(getStringValue(Constants.Client.SYSTEM_OF_REGISTRATION,true));
setMotherBaseEntityId(motherRelationId);
setFatherBaseEntityId(getRelationalId(Constants.KEY.FATHER));
setZeirId(getStringFromJson(Constants.Client.IDENTIFIERS, Constants.KEY.ZEIR_ID));
Expand Down Expand Up @@ -140,6 +142,10 @@ public String getDateOfBirth() {
return dateOfBirth;
}

public String getSystemOfRegistration()
{
return systemOfRegistration;
}
public void setDateOfBirth(String dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
Expand Down Expand Up @@ -167,7 +173,10 @@ public String getMotherLastName() {
public void setMotherLastName(String motherLastName) {
this.motherLastName = motherLastName;
}

public void setSystemOfRegistration(String systemOfRegistration)
{
this.systemOfRegistration = systemOfRegistration;
}
public void setChildJson(JSONObject ClientJson) {
this.childJson = ClientJson;
}
Expand Down Expand Up @@ -198,7 +207,11 @@ public void setMotherBaseEntityId(String motherBaseEntityId) {

@Override
public int compareTo(ChildMotherDetailModel childMotherDetailModel) {
return this.getZeirId().compareTo(childMotherDetailModel.getZeirId());
if(this.getZeirId() != null && childMotherDetailModel.getZeirId() != null)
return this.getZeirId().compareTo(childMotherDetailModel.getZeirId());
else
return 0;
Comment on lines +210 to +213
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for the extra null check? Ideally both the identifiers for the child and the mother can never be null. If they are so then the fix should be ensuring the zeir id is never null. Returning 0 means the objects are equal, is that what is desired?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

xception: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.compareTo(java.lang.String)' on a null object reference
at org.smartregister.child.model.ChildMotherDetailModel.compareTo(ChildMotherDetailModel.java:201)
at org.smartregister.child.model.ChildMotherDetailModel.compareTo(ChildMotherDetailModel.java:9)
at java.util.Collections$ReverseComparator.compare(Collections.java:5165)
at java.util.Collections$ReverseComparator.compare(Collections.java:5156)
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.util.TimSort.sort(TimSort.java:220)
at java.util.Arrays.sort(Arrays.java:1498)
at java.util.ArrayList.sort(ArrayList.java:1470)
at java.util.Collections.sort(Collections.java:201)
at org.smartregister.child.util.ChildJsonFormUtils.processReturnedAdvanceSearchResults(ChildJsonFormUtils.java:2253)
at org.smartregister.child.model.BaseChildAdvancedSearchModel.getChildMotherDetailModels(BaseChildAdvancedSearchModel.java:208)
at org.smartregister.path.model.AdvancedSearchModel.createMatrixCursor(AdvancedSearchModel.java:63)
at org.smartregister.child.presenter.BaseChildAdvancedSearchPresenter.onResultsFound(BaseChildAdvancedSearchPresenter.java:112)
at org.smartregister.child.interactor.ChildAdvancedSearchInteractor.lambda$null$0(ChildAdvancedSearchInteractor.java:55)
at org.smartregister.child.interactor.-$$Lambda$ChildAdvancedSearchInteractor$sKC-cLVEIGA04K-drgD59pcU0cY.run(:6)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7156)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

In firebase this crash was occurring frequently on thats why i've added an extra null check where it was occuring on comparison the goal was if any Odd object with null id occurs then it wont do any sort on the false object @ellykits


}

public void setMotherJson(JSONObject motherJson) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ private void populatePatientColumn(CommonPersonObjectClient pc, SmartRegisterCli
fillValue(viewHolder.patientName, StringUtils.capitalize(childName));
}

String systemOfRegistration = Utils.getValue(pc.getColumnmaps(), Constants.Client.SYSTEM_OF_REGISTRATION,false);
fillValue(viewHolder.systemOfRegistration,systemOfRegistration != null ? systemOfRegistration: "");

String motherName = Utils.getValue(pc.getColumnmaps(), Constants.KEY.MOTHER_FIRST_NAME, true) + " " +
Utils.getValue(pc, Constants.KEY.MOTHER_LAST_NAME, true);
if (StringUtils.isNotBlank(motherName)) {
Expand Down Expand Up @@ -329,6 +332,7 @@ public static class RegisterViewHolder extends RecyclerView.ViewHolder {
private View recordVaccination;
private View showCompliance;
private View registerColumns;
private TextView systemOfRegistration;

RegisterViewHolder(View itemView) {
super(itemView);
Expand All @@ -343,6 +347,7 @@ public static class RegisterViewHolder extends RecyclerView.ViewHolder {
recordVaccination = itemView.findViewById(R.id.record_vaccination);
showCompliance = itemView.findViewById(R.id.ll_compliance);
registerColumns = itemView.findViewById(R.id.register_columns);
systemOfRegistration = itemView.findViewById(R.id.system_of_registration);

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ public interface Client {
String DATE_CREATED = "dateCreated";
String FIRST_NAME = "firstName";
String LAST_NAME = "lastName";
String SYSTEM_OF_REGISTRATION = "system_of_registration";
String BIRTHDATE = "birthdate";
String ID_LOWER_CASE = "_id";
String IDENTIFIERS = "identifiers";
Expand Down
11 changes: 11 additions & 0 deletions opensrp-child/src/main/res/layout/child_register_list_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@
android:textColor="@color/client_list_grey"
android:textSize="14sp" />

<org.smartregister.view.customcontrols.CustomFontTextView
style="@style/CustomFontTextViewStyle.ClientList.Bold"
android:id="@+id/system_of_registration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MVACC"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/child_mothername"
android:textColor="@color/gender_neutral_green"
android:textSize="14sp" />

<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/child_age"
style="@style/CustomFontTextViewStyle.ClientList.Light"
Expand Down
13 changes: 12 additions & 1 deletion opensrp-child/src/main/res/layout/content_child_immunization.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@
android:text="Age"
android:textColor="@color/dark_grey"
android:textSize="@dimen/activity_sub_title_size" />

<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/system_of_registration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/CustomFontTextViewStyle.ClientList.Bold"
android:layout_marginLeft="15dp"
android:gravity="left"
android:text="MVacc"
android:textColor="@color/gender_neutral_green"
android:textSize="@dimen/activity_sub_title_size"
/>
</LinearLayout>

<LinearLayout
Expand All @@ -128,7 +140,6 @@
android:textColor="@color/easy_black"
android:textSize="@dimen/activity_sub_title_size"
android:textStyle="bold" />

</LinearLayout>
</LinearLayout>
</LinearLayout>
Expand Down
10 changes: 10 additions & 0 deletions opensrp-child/src/main/res/layout/widget_demographics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,17 @@
android:textStyle="bold" />

</LinearLayout>

</LinearLayout>

<org.smartregister.view.customcontrols.CustomFontTextView
style="@style/CustomFontTextViewStyle.ClientList.Bold"
android:id="@+id/system_of_registration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MVACC"
android:textColor="@color/gender_neutral_green"
android:textSize="@dimen/activity_sub_title_size" />

</LinearLayout>
</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -309,16 +309,19 @@ public void testRenderProfileWidget() {
childDetails.put(Constants.KEY.DOB, "1990-05-09");
childDetails.put(Constants.KEY.BIRTH_HEIGHT, "48");
childDetails.put(Constants.KEY.BIRTH_WEIGHT, "3.6");
childDetails.put(Constants.Client.SYSTEM_OF_REGISTRATION,"MVACC");

TextView profilename = Mockito.mock(TextView.class);
TextView profileOpenSrpId = Mockito.mock(TextView.class);
TextView profileage = Mockito.mock(TextView.class);
TextView systemOfRegistration = Mockito.mock(TextView.class);
View view = Mockito.mock(View.class);
ImageView imageView = Mockito.mock(ImageView.class);
doReturn(profilename).when(baseChildDetailTabbedActivity).findViewById(R.id.name);
doReturn(profileOpenSrpId).when(baseChildDetailTabbedActivity).findViewById(R.id.idforclient);
doReturn(profileage).when(baseChildDetailTabbedActivity).findViewById(R.id.ageforclient);
doReturn(view).when(baseChildDetailTabbedActivity).findViewById(R.id.outOfCatchment);
doReturn(systemOfRegistration).when(baseChildDetailTabbedActivity).findViewById(R.id.system_of_registration);

CommonPersonObjectClient commonPersonObjectClient = getChildDetails();
commonPersonObjectClient.setCaseId(null);
Expand All @@ -336,9 +339,15 @@ public void testRenderProfileWidget() {
baseChildDetailTabbedActivity.renderProfileWidget(childDetails);

verify(view).setVisibility(View.GONE);
verify(systemOfRegistration).setText("MVACC");
verify(profileOpenSrpId).setText(" id1");
verify(profilename).setText("John Doe");
verify(profileage).setText(" 10y");

childDetails.remove(Constants.Client.SYSTEM_OF_REGISTRATION);
baseChildDetailTabbedActivity.renderProfileWidget(childDetails);
verify(systemOfRegistration).setVisibility(View.GONE);

}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ private CommonPersonObjectClient getChildDetails() {
childDetails.put(Constants.KEY.DOB, "1990-05-09");
childDetails.put(Constants.KEY.BIRTH_HEIGHT, "48");
childDetails.put(Constants.KEY.BIRTH_WEIGHT, "3.6");
childDetails.put(Constants.Client.SYSTEM_OF_REGISTRATION,"MVACC");

CommonPersonObjectClient commonPersonObjectClient = new CommonPersonObjectClient("id-1", childDetails, Constants.KEY.CHILD);
commonPersonObjectClient.setColumnmaps(childDetails);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@RunWith(PowerMockRunner.class)
public class ChildMotherDetailModelTest {

private String searchResponse = "[{\"type\":\"Client\",\"dateCreated\":\"2020-10-13T07:57:11.105+01:00\",\"serverVersion\":1600329284434,\"clientApplicationVersion\":1,\"clientDatabaseVersion\":11,\"baseEntityId\":\"20770b0a-f8e9-4ed5-bf25-bb10c4a2cfbc\",\"identifiers\":{\"zeir_id\":\"1000017\"},\"addresses\":[{\"addressType\":\"\",\"addressFields\":{\"address1\":\"Small villa\",\"address2\":\"Illinois\"}}],\"attributes\":{\"age\":\"0.18\",\"child_reg\":\"19012990192\",\"ga_at_birth\":\"39\",\"sms_recipient\":\"mother\",\"place_of_birth\":\"hospital\",\"birth_registration_number\":\"2020/0809\",\"inactive\":\"inactive\",\"lost_to_follow_up\":\"yes\"},\"firstName\":\"Benjamin\",\"lastName\":\"Franklin\",\"birthdate\":\"2020-08-09T13:00:00.000+01:00\",\"birthdateApprox\":false,\"deathdateApprox\":false,\"gender\":\"Male\",\"relationships\":{\"father\":[\"ef052dab-564e-47c6-8550-dbedc50ae06f\"],\"mother\":[\"29a28f93-779d-4936-aee2-1fdb02eee9b9\"]},\"teamId\":\"8c1112a5-7d17-41b3-b8fa-e1dafa87e9e4\",\"_id\":\"c0e7fd14-308a-4475-bc1b-1b651f5bf105\",\"_rev\":\"v1\"},{\"type\":\"Client\",\"dateCreated\":\"2020-10-13T07:57:11.144+01:00\",\"serverVersion\":1600329284435,\"baseEntityId\":\"29a28f93-779d-4936-aee2-1fdb02eee9b9\",\"identifiers\":{\"M_ZEIR_ID\":\"100003-3\"},\"addresses\":[{\"addressType\":\"\",\"addressFields\":{\"address1\":\"Small villa\",\"address2\":\"Illinois\"}}],\"attributes\":{\"first_birth\":\"yes\",\"mother_rubella\":\"yes\",\"mother_tdv_doses\":\"2_plus_tdv_doses\",\"rubella_serology\":\"yes\",\"serology_results\":\"negative\",\"mother_nationality\":\"other\",\"second_phone_number\":\"23233232\",\"mother_guardian_number\":\"07456566\",\"mother_nationality_other\":\"American\"},\"firstName\":\"Gates\",\"lastName\":\"Belinda\",\"birthdate\":\"1973-01-01T13:00:00.000+01:00\",\"birthdateApprox\":false,\"deathdateApprox\":false,\"gender\":\"female\",\"_id\":\"95c4951a-aadb-4b41-8e50-8f7566fea40b\",\"_rev\":\"v1\"}]";
private String searchResponse = "[{\"type\":\"Client\",\"dateCreated\":\"2020-10-13T07:57:11.105+01:00\",\"system_of_registration\":\"MVACC\",\"serverVersion\":1600329284434,\"clientApplicationVersion\":1,\"clientDatabaseVersion\":11,\"baseEntityId\":\"20770b0a-f8e9-4ed5-bf25-bb10c4a2cfbc\",\"identifiers\":{\"zeir_id\":\"1000017\"},\"addresses\":[{\"addressType\":\"\",\"addressFields\":{\"address1\":\"Small villa\",\"address2\":\"Illinois\"}}],\"attributes\":{\"age\":\"0.18\",\"child_reg\":\"19012990192\",\"ga_at_birth\":\"39\",\"sms_recipient\":\"mother\",\"place_of_birth\":\"hospital\",\"birth_registration_number\":\"2020/0809\",\"inactive\":\"inactive\",\"lost_to_follow_up\":\"yes\"},\"firstName\":\"Benjamin\",\"lastName\":\"Franklin\",\"birthdate\":\"2020-08-09T13:00:00.000+01:00\",\"birthdateApprox\":false,\"deathdateApprox\":false,\"gender\":\"Male\",\"relationships\":{\"father\":[\"ef052dab-564e-47c6-8550-dbedc50ae06f\"],\"mother\":[\"29a28f93-779d-4936-aee2-1fdb02eee9b9\"]},\"teamId\":\"8c1112a5-7d17-41b3-b8fa-e1dafa87e9e4\",\"_id\":\"c0e7fd14-308a-4475-bc1b-1b651f5bf105\",\"_rev\":\"v1\"},{\"type\":\"Client\",\"dateCreated\":\"2020-10-13T07:57:11.144+01:00\",\"serverVersion\":1600329284435,\"baseEntityId\":\"29a28f93-779d-4936-aee2-1fdb02eee9b9\",\"identifiers\":{\"M_ZEIR_ID\":\"100003-3\"},\"addresses\":[{\"addressType\":\"\",\"addressFields\":{\"address1\":\"Small villa\",\"address2\":\"Illinois\"}}],\"attributes\":{\"first_birth\":\"yes\",\"mother_rubella\":\"yes\",\"mother_tdv_doses\":\"2_plus_tdv_doses\",\"rubella_serology\":\"yes\",\"serology_results\":\"negative\",\"mother_nationality\":\"other\",\"second_phone_number\":\"23233232\",\"mother_guardian_number\":\"07456566\",\"mother_nationality_other\":\"American\"},\"firstName\":\"Gates\",\"lastName\":\"Belinda\",\"birthdate\":\"1973-01-01T13:00:00.000+01:00\",\"birthdateApprox\":false,\"deathdateApprox\":false,\"gender\":\"female\",\"_id\":\"95c4951a-aadb-4b41-8e50-8f7566fea40b\",\"_rev\":\"v1\"}]";

@Before
public void setUp() {
Expand Down Expand Up @@ -90,6 +90,7 @@ public void testChildMotherDetailModelSetsAllFieldsCorrectlyWhenMotherAndChildJs
Assert.assertEquals(attributes.getString(Constants.Client.LOST_TO_FOLLOW_UP), model.getLostFollowUp());
Assert.assertEquals(motherJson.getString(Constants.Client.FIRST_NAME), model.getMotherFirstName());
Assert.assertEquals(motherJson.getString(Constants.Client.LAST_NAME), model.getMotherLastName());
Assert.assertEquals(childJson.getString(Constants.Client.SYSTEM_OF_REGISTRATION),model.getSystemOfRegistration());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ public void testGetViewShouldPopulateRegisterViewHolderIfVisibleColumnsIsEmpty()
linearLayout.addView(showCompliance);
View registerColumns = new View(RuntimeEnvironment.application);
registerColumns.setId(R.id.register_columns);
linearLayout.addView(registerColumns);
TextView systemOfRegistration = new TextView(RuntimeEnvironment.application);
systemOfRegistration.setId(R.id.system_of_registration);
linearLayout.addView(systemOfRegistration);

Mockito.doReturn(opensrpContext).when(childLibrary).context();
Mockito.doReturn(allSharedPreferences).when(opensrpContext).allSharedPreferences();
Expand All @@ -142,7 +144,7 @@ public void testGetViewShouldPopulateRegisterViewHolderIfVisibleColumnsIsEmpty()
details.put(Constants.KEY.LAST_NAME, "Doe");
details.put(Constants.KEY.ZEIR_ID, "2120");
details.put(Constants.KEY.DOB, "2020-09-09");

details.put(Constants.Client.SYSTEM_OF_REGISTRATION,"MVACC");
details.put(Constants.KEY.MOTHER_FIRST_NAME, "Jane");
details.put(Constants.KEY.MOTHER_LAST_NAME, "Doe");

Expand All @@ -158,6 +160,7 @@ public void testGetViewShouldPopulateRegisterViewHolderIfVisibleColumnsIsEmpty()
Assert.assertEquals(details.get(Constants.KEY.ZEIR_ID), childOpensrpID.getText().toString());
Assert.assertEquals(String.format(opensrpContext.applicationContext().getString(R.string.mother_name), details.get(Constants.KEY.MOTHER_FIRST_NAME) + " " + details.get(Constants.KEY.MOTHER_LAST_NAME)), childMotherName.getText().toString());
Assert.assertEquals(details.get(Constants.KEY.FIRST_NAME) + " " + details.get(Constants.KEY.LAST_NAME), txtPatientName.getText().toString());
Assert.assertEquals(details.get(Constants.Client.SYSTEM_OF_REGISTRATION),systemOfRegistration.getText());

ReflectionHelpers.setStaticField(ChildLibrary.class, "instance", null);

Expand Down
Loading