diff --git a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/interfaces/JsonApi.java b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/interfaces/JsonApi.java index f774d4c6a..18aafa3f2 100644 --- a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/interfaces/JsonApi.java +++ b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/interfaces/JsonApi.java @@ -10,7 +10,6 @@ import org.json.JSONException; import org.json.JSONObject; import org.smartregister.client.utils.contract.ClientFormContract; -import org.smartregister.client.utils.contract.JsonSubFormAndRulesLoader; import java.util.Collection; import java.util.Map; @@ -19,6 +18,7 @@ * Created by vijay on 5/16/15. */ public interface JsonApi extends ClientFormContract.View { + JSONObject getStep(String stepName); void writeValue(String stepName, String key, String value, String openMrsEntityParent, diff --git a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/utils/FormUtils.java b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/utils/FormUtils.java index 61677c90e..5565078b0 100644 --- a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/utils/FormUtils.java +++ b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/utils/FormUtils.java @@ -1912,7 +1912,7 @@ public void onFormSelected(@NonNull ClientFormContract.Model selectedForm) { if (isRulesFile) { try { - clientForm.setJson(Utils.convertStreamToString(context.getAssets().open(formIdentity))); + clientForm.setJson(convertStreamToString(context.getAssets().open(formIdentity))); } catch (IOException e) { Timber.e(e); } @@ -1955,7 +1955,7 @@ public JSONObject getSubFormJsonFromRepository(@NonNull Context context, @NonNul clientForm = clientFormDao.getActiveClientFormByIdentifier(revisedFormName); if (clientForm == null) { - String finalSubFormsLocation = com.vijay.jsonwizard.utils.FormUtils.getSubFormLocation(subFormsLocation); + String finalSubFormsLocation = getSubFormLocation(subFormsLocation); dbFormName = StringUtils.isBlank(finalSubFormsLocation) ? localeFormIdentity : finalSubFormsLocation + "/" + localeFormIdentity; clientForm = clientFormDao.getActiveClientFormByIdentifier(dbFormName); diff --git a/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/utils/FormUtilsTest.java b/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/utils/FormUtilsTest.java index b6453e110..cb60dc614 100644 --- a/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/utils/FormUtilsTest.java +++ b/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/utils/FormUtilsTest.java @@ -19,7 +19,6 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.robolectric.RuntimeEnvironment; -import org.robolectric.util.ReflectionHelpers; import org.smartregister.client.utils.contract.ClientFormContract; import java.text.SimpleDateFormat;