target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testAttemptLoginShouldErrorIfAppIsOutdated() { when(loginView.isAppVersionAllowed()).thenReturn(false); presenter.attemptLogin("john", "doe".toCharArray()); verify(loginView).showErrorDialog(activity.getString(R.string.outdated_app)); verify(loginView).isAppVersionAllowed(); verify(loginView).getActiv...
@Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView().resetUsernameError(); getLoginView().resetPaswordError(); b...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
@Test public void testAttemptLoginShouldNotInvokeLoginAndDisplaysErrors() { when(loginView.isAppVersionAllowed()).thenReturn(true); presenter.attemptLogin("", "".toCharArray()); verify(loginView).setPasswordError(R.string.error_invalid_password); verify(loginView).setUsernameError(R.string.error_field_required); verify...
@Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView().resetUsernameError(); getLoginView().resetPaswordError(); b...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
@Test public void testAttemptLoginShouldInvokeLogin() { when(loginView.isAppVersionAllowed()).thenReturn(true); presenter.attemptLogin("john", "doe".toCharArray()); verify(loginView, never()).setPasswordError(R.string.error_invalid_password); verify(loginView, never()).setUsernameError(R.string.error_field_required); v...
@Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView().resetUsernameError(); getLoginView().resetPaswordError(); b...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void attemptLogin(String username, char[] password) { if (!mLoginView.get().isAppVersionAllowed()) { getLoginView().showErrorDialog(getLoginView() .getActivityContext().getResources().getString(R.string.outdated_app)); return; } getLoginView()...
@Test public void testGetFieldJsonObject() throws JSONException { JSONArray fields = new JSONArray(clientFormFields); assertNotNull(fields); JSONObject field = JsonFormUtils.getFieldJSONObject(fields, "first_name"); assertNotNull(field); assertTrue(field.has("value")); Assert.assertEquals(field.get("value"), "John"); }
@Nullable public static JSONObject getFieldJSONObject(JSONArray jsonArray, String key) { JSONObject jsonObject = null; if (isBlankJsonArray(jsonArray)) { return jsonObject; } for (int i = 0; i < jsonArray.length(); i++) { JSONObject currJsonObject = getJSONObject(jsonArray, i); String keyVal = getString(currJsonObject,...
JsonFormUtils { @Nullable public static JSONObject getFieldJSONObject(JSONArray jsonArray, String key) { JSONObject jsonObject = null; if (isBlankJsonArray(jsonArray)) { return jsonObject; } for (int i = 0; i < jsonArray.length(); i++) { JSONObject currJsonObject = getJSONObject(jsonArray, i); String keyVal = getString...
JsonFormUtils { @Nullable public static JSONObject getFieldJSONObject(JSONArray jsonArray, String key) { JSONObject jsonObject = null; if (isBlankJsonArray(jsonArray)) { return jsonObject; } for (int i = 0; i < jsonArray.length(); i++) { JSONObject currJsonObject = getJSONObject(jsonArray, i); String keyVal = getString...
JsonFormUtils { @Nullable public static JSONObject getFieldJSONObject(JSONArray jsonArray, String key) { JSONObject jsonObject = null; if (isBlankJsonArray(jsonArray)) { return jsonObject; } for (int i = 0; i < jsonArray.length(); i++) { JSONObject currJsonObject = getJSONObject(jsonArray, i); String keyVal = getString...
JsonFormUtils { @Nullable public static JSONObject getFieldJSONObject(JSONArray jsonArray, String key) { JSONObject jsonObject = null; if (isBlankJsonArray(jsonArray)) { return jsonObject; } for (int i = 0; i < jsonArray.length(); i++) { JSONObject currJsonObject = getJSONObject(jsonArray, i); String keyVal = getString...
@Test public void testIsUserLoggedOutShouldReturnModelValue() { assertTrue(presenter.isUserLoggedOut()); verify(loginModel).isUserLoggedOut(); }
@Override public boolean isUserLoggedOut() { return mLoginModel.isUserLoggedOut(); }
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public boolean isUserLoggedOut() { return mLoginModel.isUserLoggedOut(); } }
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public boolean isUserLoggedOut() { return mLoginModel.isUserLoggedOut(); } }
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public boolean isUserLoggedOut() { return mLoginModel.isUserLoggedOut(); } @Override void onDestroy(boolean isChangingConfiguration); @Override void attemptLogin(String username, char[] password); @Override BaseLoginContract.View getLoginView(); @Ov...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public boolean isUserLoggedOut() { return mLoginModel.isUserLoggedOut(); } @Override void onDestroy(boolean isChangingConfiguration); @Override void attemptLogin(String username, char[] password); @Override BaseLoginContract.View getLoginView(); @Ov...
@Test public void testSetLanguage() { presenter.setLanguage(); Configuration config = activity.getResources().getConfiguration(); assertEquals(1, config.getLocales().size()); assertEquals("en", config.getLocales().get(0).getLanguage()); }
@Override public void setLanguage() { AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(mLoginModel.getOpenSRPContext() .applicationContext())); String preferredLocale = allSharedPreferences.fetchLanguagePreference(); Resources resources = mLoginModel.getOpenSRPContext().a...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void setLanguage() { AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(mLoginModel.getOpenSRPContext() .applicationContext())); String preferredLocale = allSharedPreferences.fetchLanguagePreferenc...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void setLanguage() { AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(mLoginModel.getOpenSRPContext() .applicationContext())); String preferredLocale = allSharedPreferences.fetchLanguagePreferenc...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void setLanguage() { AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(mLoginModel.getOpenSRPContext() .applicationContext())); String preferredLocale = allSharedPreferences.fetchLanguagePreferenc...
BaseLoginPresenter implements BaseLoginContract.Presenter { @Override public void setLanguage() { AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(mLoginModel.getOpenSRPContext() .applicationContext())); String preferredLocale = allSharedPreferences.fetchLanguagePreferenc...
@Test public void testGetJsonViewFromPreference() { getDefaultSharedPreferences(loginView.getActivityContext()).edit().putString("asdsa", "232").commit(); assertEquals("232", presenter.getJsonViewFromPreference("asdsa")); }
public String getJsonViewFromPreference(String viewKey) { return getDefaultSharedPreferences(getLoginView().getActivityContext()).getString(viewKey, null); }
BaseLoginPresenter implements BaseLoginContract.Presenter { public String getJsonViewFromPreference(String viewKey) { return getDefaultSharedPreferences(getLoginView().getActivityContext()).getString(viewKey, null); } }
BaseLoginPresenter implements BaseLoginContract.Presenter { public String getJsonViewFromPreference(String viewKey) { return getDefaultSharedPreferences(getLoginView().getActivityContext()).getString(viewKey, null); } }
BaseLoginPresenter implements BaseLoginContract.Presenter { public String getJsonViewFromPreference(String viewKey) { return getDefaultSharedPreferences(getLoginView().getActivityContext()).getString(viewKey, null); } @Override void onDestroy(boolean isChangingConfiguration); @Override void attemptLogin(String usernam...
BaseLoginPresenter implements BaseLoginContract.Presenter { public String getJsonViewFromPreference(String viewKey) { return getDefaultSharedPreferences(getLoginView().getActivityContext()).getString(viewKey, null); } @Override void onDestroy(boolean isChangingConfiguration); @Override void attemptLogin(String usernam...
@Test public void testGetOpenSRPContextShouldReturnContext() { assertNotNull(loginModel.getOpenSRPContext()); assertEquals(CoreLibrary.getInstance().context(), loginModel.getOpenSRPContext()); }
@Override public org.smartregister.Context getOpenSRPContext() { return CoreLibrary.getInstance().context(); }
BaseLoginModel implements BaseLoginContract.Model { @Override public org.smartregister.Context getOpenSRPContext() { return CoreLibrary.getInstance().context(); } }
BaseLoginModel implements BaseLoginContract.Model { @Override public org.smartregister.Context getOpenSRPContext() { return CoreLibrary.getInstance().context(); } }
BaseLoginModel implements BaseLoginContract.Model { @Override public org.smartregister.Context getOpenSRPContext() { return CoreLibrary.getInstance().context(); } @Override org.smartregister.Context getOpenSRPContext(); @Override boolean isPasswordValid(char[] password); @Override boolean isEmptyUsername(String userna...
BaseLoginModel implements BaseLoginContract.Model { @Override public org.smartregister.Context getOpenSRPContext() { return CoreLibrary.getInstance().context(); } @Override org.smartregister.Context getOpenSRPContext(); @Override boolean isPasswordValid(char[] password); @Override boolean isEmptyUsername(String userna...
@Test public void testIsPasswordValidReturnsCorrectResult() { assertFalse(loginModel.isPasswordValid("".toCharArray())); assertTrue(loginModel.isPasswordValid("qwerty120".toCharArray())); }
@Override public boolean isPasswordValid(char[] password) { return password != null && password.length > 1; }
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isPasswordValid(char[] password) { return password != null && password.length > 1; } }
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isPasswordValid(char[] password) { return password != null && password.length > 1; } }
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isPasswordValid(char[] password) { return password != null && password.length > 1; } @Override org.smartregister.Context getOpenSRPContext(); @Override boolean isPasswordValid(char[] password); @Override boolean isEmptyUsername(String usernam...
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isPasswordValid(char[] password) { return password != null && password.length > 1; } @Override org.smartregister.Context getOpenSRPContext(); @Override boolean isPasswordValid(char[] password); @Override boolean isEmptyUsername(String usernam...
@Test public void testIsEmptyUsernameReturnsCorrectResult() { assertFalse(loginModel.isEmptyUsername("doe")); assertTrue(loginModel.isEmptyUsername("")); assertTrue(loginModel.isEmptyUsername(null)); }
@Override public boolean isEmptyUsername(String username) { return username == null || TextUtils.isEmpty(username); }
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isEmptyUsername(String username) { return username == null || TextUtils.isEmpty(username); } }
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isEmptyUsername(String username) { return username == null || TextUtils.isEmpty(username); } }
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isEmptyUsername(String username) { return username == null || TextUtils.isEmpty(username); } @Override org.smartregister.Context getOpenSRPContext(); @Override boolean isPasswordValid(char[] password); @Override boolean isEmptyUsername(String...
BaseLoginModel implements BaseLoginContract.Model { @Override public boolean isEmptyUsername(String username) { return username == null || TextUtils.isEmpty(username); } @Override org.smartregister.Context getOpenSRPContext(); @Override boolean isPasswordValid(char[] password); @Override boolean isEmptyUsername(String...
@Test public void testOnDestroyShouldSetPresenterNull() { assertNotNull(Whitebox.getInternalState(interactor, "mLoginPresenter")); interactor.onDestroy(false); assertNull(Whitebox.getInternalState(interactor, "mLoginPresenter")); }
@Override public void onDestroy(boolean isChangingConfiguration) { if (!isChangingConfiguration) { mLoginPresenter = null; } }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void onDestroy(boolean isChangingConfiguration) { if (!isChangingConfiguration) { mLoginPresenter = null; } } }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void onDestroy(boolean isChangingConfiguration) { if (!isChangingConfiguration) { mLoginPresenter = null; } } BaseLoginInteractor(BaseLoginContract.Presenter loginPresenter); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void onDestroy(boolean isChangingConfiguration) { if (!isChangingConfiguration) { mLoginPresenter = null; } } BaseLoginInteractor(BaseLoginContract.Presenter loginPresenter); @Override void onDestroy(boolean isChangingConfiguration); @Overri...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void onDestroy(boolean isChangingConfiguration) { if (!isChangingConfiguration) { mLoginPresenter = null; } } BaseLoginInteractor(BaseLoginContract.Presenter loginPresenter); @Override void onDestroy(boolean isChangingConfiguration); @Overri...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWithBaseURLIsMissing() { when(allSharedPreferences.fetchBaseURL("")).thenReturn(""); interactor.login(new WeakReference<>(view), "johndoe", password); verify(view).hideKeyboard(); verify(view).enableLoginButton(false); verify(allSharedPreferences).savePreference("D...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWithGenericError() { interactor.login(new WeakReference<>(view), "johndoe", password); verify(view).hideKeyboard(); verify(view).enableLoginButton(false); verify(allSharedPreferences, never()).savePreference("DRISHTI_BASE_URL", activity.getString(R.string.opensrp_u...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWhenNoInternetConnectivity() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(httpAgent.oauth2authenticate(ArgumentMatchers.anyString(), ArgumentMatchers.any(char[].class), ArgumentMatchers.eq(AccountHelper.OAUTH.GR...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testAddMultiSelectListObservations() throws Exception { Event event = new Event(); JSONObject jsonObject = new JSONObject(); JSONObject jsonObject1 = new JSONObject(); jsonObject1.put(OPENMRS_ENTITY_ID, "entityId"); jsonObject1.put(OPENMRS_ENTITY, "concept"); jsonObject1.put(AllConstants.TEXT,"text");...
private static void addMultiSelectListObservations(@NonNull Event event, @NonNull JSONObject jsonObject) { JSONArray valuesJsonArray; try { valuesJsonArray = new JSONArray(jsonObject.optString(VALUE)); for (int i = 0; i < valuesJsonArray.length(); i++) { JSONObject jsonValObject = valuesJsonArray.optJSONObject(i); Stri...
JsonFormUtils { private static void addMultiSelectListObservations(@NonNull Event event, @NonNull JSONObject jsonObject) { JSONArray valuesJsonArray; try { valuesJsonArray = new JSONArray(jsonObject.optString(VALUE)); for (int i = 0; i < valuesJsonArray.length(); i++) { JSONObject jsonValObject = valuesJsonArray.optJSO...
JsonFormUtils { private static void addMultiSelectListObservations(@NonNull Event event, @NonNull JSONObject jsonObject) { JSONArray valuesJsonArray; try { valuesJsonArray = new JSONArray(jsonObject.optString(VALUE)); for (int i = 0; i < valuesJsonArray.length(); i++) { JSONObject jsonValObject = valuesJsonArray.optJSO...
JsonFormUtils { private static void addMultiSelectListObservations(@NonNull Event event, @NonNull JSONObject jsonObject) { JSONArray valuesJsonArray; try { valuesJsonArray = new JSONArray(jsonObject.optString(VALUE)); for (int i = 0; i < valuesJsonArray.length(); i++) { JSONObject jsonValObject = valuesJsonArray.optJSO...
JsonFormUtils { private static void addMultiSelectListObservations(@NonNull Event event, @NonNull JSONObject jsonObject) { JSONArray valuesJsonArray; try { valuesJsonArray = new JSONArray(jsonObject.optString(VALUE)); for (int i = 0; i < valuesJsonArray.length(); i++) { JSONObject jsonValObject = valuesJsonArray.optJSO...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWhenNullLoginResponse() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(httpAgent.oauth2authenticate(ArgumentMatchers.anyString(), ArgumentMatchers.any(char[].class), ArgumentMatchers.eq(AccountHelper.OAUTH.GRANT_T...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWhenResponseUnknown() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(httpAgent.oauth2authenticate(ArgumentMatchers.anyString(), ArgumentMatchers.any(char[].class), ArgumentMatchers.eq(AccountHelper.OAUTH.GRANT_TYP...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWhenUnauthorized() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(httpAgent.oauth2authenticate(ArgumentMatchers.anyString(), ArgumentMatchers.any(char[].class), ArgumentMatchers.eq(AccountHelper.OAUTH.GRANT_TYPE.P...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWhenTimeIsWrong() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(httpAgent.oauth2authenticate(ArgumentMatchers.anyString(), ArgumentMatchers.any(char[].class), ArgumentMatchers.eq(AccountHelper.OAUTH.GRANT_TYPE.PA...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWhenTimeZoneIsWrong() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(userService.fetchUserDetails(ArgumentMatchers.anyString())).thenReturn(LoginResponse.SUCCESS.withPayload(loginResponseData)); when(userService.s...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginAttemptsRemoteLoginAndErrorsWithErrorFromEnum() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(httpAgent.oauth2authenticate(ArgumentMatchers.anyString(), ArgumentMatchers.any(char[].class), ArgumentMatchers.eq(AccountHelper.OAUTH.GRANT_TYPE....
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test @Config(shadows = {ShadowNetworkUtils.class}) public void testLoginAttemptsRemoteLoginAndNavigatesToHome() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(userService.fetchUserDetails(ArgumentMatchers.anyString())).thenReturn(LoginResponse.SUCCESS.withPayload(log...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testLoginWithLocalFlagShouldFailsForDifferentTeam() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); Whitebox.setInternalState(interactor, "resetAppHelper", resetAppHelper); Whitebox.setInternalState(CoreLibrary.getInstance(), "syncConfiguration", syncConfi...
public void loginWithLocalFlag(WeakReference<BaseLoginContract.View> view, boolean localLogin, String userName, char[] password) { getLoginView().hideKeyboard(); getLoginView().enableLoginButton(false); if (localLogin) { localLogin(view, userName, password); } else { remoteLogin(userName, password, CoreLibrary.getInsta...
BaseLoginInteractor implements BaseLoginContract.Interactor { public void loginWithLocalFlag(WeakReference<BaseLoginContract.View> view, boolean localLogin, String userName, char[] password) { getLoginView().hideKeyboard(); getLoginView().enableLoginButton(false); if (localLogin) { localLogin(view, userName, password);...
BaseLoginInteractor implements BaseLoginContract.Interactor { public void loginWithLocalFlag(WeakReference<BaseLoginContract.View> view, boolean localLogin, String userName, char[] password) { getLoginView().hideKeyboard(); getLoginView().enableLoginButton(false); if (localLogin) { localLogin(view, userName, password);...
BaseLoginInteractor implements BaseLoginContract.Interactor { public void loginWithLocalFlag(WeakReference<BaseLoginContract.View> view, boolean localLogin, String userName, char[] password) { getLoginView().hideKeyboard(); getLoginView().enableLoginButton(false); if (localLogin) { localLogin(view, userName, password);...
BaseLoginInteractor implements BaseLoginContract.Interactor { public void loginWithLocalFlag(WeakReference<BaseLoginContract.View> view, boolean localLogin, String userName, char[] password) { getLoginView().hideKeyboard(); getLoginView().enableLoginButton(false); if (localLogin) { localLogin(view, userName, password);...
@Test public void testLocalLoginShouldShowErrorWhenNotAuthenticated() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(allSharedPreferences.fetchForceRemoteLogin(username)).thenReturn(false); when(allSharedPreferences.fetchRegisteredANM()).thenReturn(username); when(all...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test @Config(shadows = {ShadowNetworkUtils.class}) public void testLocalLoginShouldShowNavigateToHomeAndReleaseIds() { Whitebox.setInternalState(CoreLibrary.getInstance().context(), "userService", userService); when(context.getUniqueIdRepository()).thenReturn(uniqueIdRepository); when(allSharedPreferences.fetchForceRe...
@Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegisteredANM(userName), userName, password); }
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
BaseLoginInteractor implements BaseLoginContract.Interactor { @Override public void login(WeakReference<BaseLoginContract.View> view, String userName, char[] password) { boolean localLogin = !getSharedPreferences().fetchForceRemoteLogin(userName); loginWithLocalFlag(view, localLogin && getSharedPreferences().isRegister...
@Test public void testGetSingleStepFormFieldsShouldGetStep1Fields() throws JSONException { JSONArray actualFieldsJsonArr = JsonFormUtils.getSingleStepFormfields(new JSONObject(multiStepForm)); assertNotNull(actualFieldsJsonArr); String expectedFieldsJsonArr = new JSONArray(STEP_1_FIELDS).toString(); assertEquals(actual...
public static JSONArray getSingleStepFormfields(JSONObject jsonForm) { JSONObject step1 = jsonForm.optJSONObject(STEP1); if (step1 == null) { return null; } return step1.optJSONArray(FIELDS); }
JsonFormUtils { public static JSONArray getSingleStepFormfields(JSONObject jsonForm) { JSONObject step1 = jsonForm.optJSONObject(STEP1); if (step1 == null) { return null; } return step1.optJSONArray(FIELDS); } }
JsonFormUtils { public static JSONArray getSingleStepFormfields(JSONObject jsonForm) { JSONObject step1 = jsonForm.optJSONObject(STEP1); if (step1 == null) { return null; } return step1.optJSONArray(FIELDS); } }
JsonFormUtils { public static JSONArray getSingleStepFormfields(JSONObject jsonForm) { JSONObject step1 = jsonForm.optJSONObject(STEP1); if (step1 == null) { return null; } return step1.optJSONArray(FIELDS); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(...
JsonFormUtils { public static JSONArray getSingleStepFormfields(JSONObject jsonForm) { JSONObject step1 = jsonForm.optJSONObject(STEP1); if (step1 == null) { return null; } return step1.optJSONArray(FIELDS); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(...
@Test public void testGetFlexValueShouldReturnCorrectFlex() { assertEquals(5, interactor.getFlexValue(2)); assertEquals(20, interactor.getFlexValue(60)); }
protected long getFlexValue(int value) { int minutes = MINIMUM_JOB_FLEX_VALUE; if (value > MINIMUM_JOB_FLEX_VALUE) { minutes = (int) Math.ceil(value / 3); } return minutes < MINIMUM_JOB_FLEX_VALUE ? MINIMUM_JOB_FLEX_VALUE : minutes; }
BaseLoginInteractor implements BaseLoginContract.Interactor { protected long getFlexValue(int value) { int minutes = MINIMUM_JOB_FLEX_VALUE; if (value > MINIMUM_JOB_FLEX_VALUE) { minutes = (int) Math.ceil(value / 3); } return minutes < MINIMUM_JOB_FLEX_VALUE ? MINIMUM_JOB_FLEX_VALUE : minutes; } }
BaseLoginInteractor implements BaseLoginContract.Interactor { protected long getFlexValue(int value) { int minutes = MINIMUM_JOB_FLEX_VALUE; if (value > MINIMUM_JOB_FLEX_VALUE) { minutes = (int) Math.ceil(value / 3); } return minutes < MINIMUM_JOB_FLEX_VALUE ? MINIMUM_JOB_FLEX_VALUE : minutes; } BaseLoginInteractor(Bas...
BaseLoginInteractor implements BaseLoginContract.Interactor { protected long getFlexValue(int value) { int minutes = MINIMUM_JOB_FLEX_VALUE; if (value > MINIMUM_JOB_FLEX_VALUE) { minutes = (int) Math.ceil(value / 3); } return minutes < MINIMUM_JOB_FLEX_VALUE ? MINIMUM_JOB_FLEX_VALUE : minutes; } BaseLoginInteractor(Bas...
BaseLoginInteractor implements BaseLoginContract.Interactor { protected long getFlexValue(int value) { int minutes = MINIMUM_JOB_FLEX_VALUE; if (value > MINIMUM_JOB_FLEX_VALUE) { minutes = (int) Math.ceil(value / 3); } return minutes < MINIMUM_JOB_FLEX_VALUE ? MINIMUM_JOB_FLEX_VALUE : minutes; } BaseLoginInteractor(Bas...
@Test public void testProcessServerSettingsShouldSaveSettings() throws JSONException { JSONObject jsonObject = new JSONObject(); jsonObject.put(AllConstants.PREF_KEY.SETTINGS, new JSONArray("[{\"identifier\":\"login\",\"serverVersion\":1212121}]")); LoginResponse loginResponse = LoginResponse.SUCCESS.withPayload(loginR...
protected void processServerSettings(LoginResponse loginResponse) { JSONObject data = loginResponse.getRawData(); if (data != null) { try { JSONArray settings = data.has(AllConstants.PREF_KEY.SETTINGS) ? data.getJSONArray(AllConstants.PREF_KEY.SETTINGS) : null; if (settings != null && settings.length() > 0) { ServerSet...
BaseLoginInteractor implements BaseLoginContract.Interactor { protected void processServerSettings(LoginResponse loginResponse) { JSONObject data = loginResponse.getRawData(); if (data != null) { try { JSONArray settings = data.has(AllConstants.PREF_KEY.SETTINGS) ? data.getJSONArray(AllConstants.PREF_KEY.SETTINGS) : nu...
BaseLoginInteractor implements BaseLoginContract.Interactor { protected void processServerSettings(LoginResponse loginResponse) { JSONObject data = loginResponse.getRawData(); if (data != null) { try { JSONArray settings = data.has(AllConstants.PREF_KEY.SETTINGS) ? data.getJSONArray(AllConstants.PREF_KEY.SETTINGS) : nu...
BaseLoginInteractor implements BaseLoginContract.Interactor { protected void processServerSettings(LoginResponse loginResponse) { JSONObject data = loginResponse.getRawData(); if (data != null) { try { JSONArray settings = data.has(AllConstants.PREF_KEY.SETTINGS) ? data.getJSONArray(AllConstants.PREF_KEY.SETTINGS) : nu...
BaseLoginInteractor implements BaseLoginContract.Interactor { protected void processServerSettings(LoginResponse loginResponse) { JSONObject data = loginResponse.getRawData(); if (data != null) { try { JSONArray settings = data.has(AllConstants.PREF_KEY.SETTINGS) ? data.getJSONArray(AllConstants.PREF_KEY.SETTINGS) : nu...
@Test public void clientVersion() { Assert.assertEquals(formSubmission.clientVersion(), 0l); }
public long clientVersion() { return this.clientVersion; }
FormSubmission extends MotechBaseDataObject { public long clientVersion() { return this.clientVersion; } }
FormSubmission extends MotechBaseDataObject { public long clientVersion() { return this.clientVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
FormSubmission extends MotechBaseDataObject { public long clientVersion() { return this.clientVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
FormSubmission extends MotechBaseDataObject { public long clientVersion() { return this.clientVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
@Test public void formDataDefinitionVersion() { Assert.assertEquals(formSubmission.formDataDefinitionVersion(), ""); }
public String formDataDefinitionVersion() { return this.formDataDefinitionVersion; }
FormSubmission extends MotechBaseDataObject { public String formDataDefinitionVersion() { return this.formDataDefinitionVersion; } }
FormSubmission extends MotechBaseDataObject { public String formDataDefinitionVersion() { return this.formDataDefinitionVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInsta...
FormSubmission extends MotechBaseDataObject { public String formDataDefinitionVersion() { return this.formDataDefinitionVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInsta...
FormSubmission extends MotechBaseDataObject { public String formDataDefinitionVersion() { return this.formDataDefinitionVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInsta...
@Test public void serverVersion() { formSubmission.setServerVersion(0l); Assert.assertEquals(formSubmission.serverVersion(), 0l); }
public long serverVersion() { return serverVersion; }
FormSubmission extends MotechBaseDataObject { public long serverVersion() { return serverVersion; } }
FormSubmission extends MotechBaseDataObject { public long serverVersion() { return serverVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
FormSubmission extends MotechBaseDataObject { public long serverVersion() { return serverVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
FormSubmission extends MotechBaseDataObject { public long serverVersion() { return serverVersion; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
@Test public void getField() { Assert.assertEquals(formSubmission.getField(""), null); }
public String getField(String name) { return formInstance.getField(name); }
FormSubmission extends MotechBaseDataObject { public String getField(String name) { return formInstance.getField(name); } }
FormSubmission extends MotechBaseDataObject { public String getField(String name) { return formInstance.getField(name); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long...
FormSubmission extends MotechBaseDataObject { public String getField(String name) { return formInstance.getField(name); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long...
FormSubmission extends MotechBaseDataObject { public String getField(String name) { return formInstance.getField(name); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long...
@Test public void getFields() { List<String> fields = new ArrayList<>(); fields.add(""); Assert.assertNotNull(formSubmission.getFields(fields)); }
public Map<String, String> getFields(List<String> fieldNames) { Map<String, String> fieldsMap = new HashMap<>(); for (String fieldName : fieldNames) { fieldsMap.put(fieldName, getField(fieldName)); } return fieldsMap; }
FormSubmission extends MotechBaseDataObject { public Map<String, String> getFields(List<String> fieldNames) { Map<String, String> fieldsMap = new HashMap<>(); for (String fieldName : fieldNames) { fieldsMap.put(fieldName, getField(fieldName)); } return fieldsMap; } }
FormSubmission extends MotechBaseDataObject { public Map<String, String> getFields(List<String> fieldNames) { Map<String, String> fieldsMap = new HashMap<>(); for (String fieldName : fieldNames) { fieldsMap.put(fieldName, getField(fieldName)); } return fieldsMap; } FormSubmission(); FormSubmission(String anmId, String...
FormSubmission extends MotechBaseDataObject { public Map<String, String> getFields(List<String> fieldNames) { Map<String, String> fieldsMap = new HashMap<>(); for (String fieldName : fieldNames) { fieldsMap.put(fieldName, getField(fieldName)); } return fieldsMap; } FormSubmission(); FormSubmission(String anmId, String...
FormSubmission extends MotechBaseDataObject { public Map<String, String> getFields(List<String> fieldNames) { Map<String, String> fieldsMap = new HashMap<>(); for (String fieldName : fieldNames) { fieldsMap.put(fieldName, getField(fieldName)); } return fieldsMap; } FormSubmission(); FormSubmission(String anmId, String...
@Test public void getInstanceId() { Assert.assertEquals(formSubmission.getInstanceId(), ""); }
public String getInstanceId() { return instanceId; }
FormSubmission extends MotechBaseDataObject { public String getInstanceId() { return instanceId; } }
FormSubmission extends MotechBaseDataObject { public String getInstanceId() { return instanceId; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
FormSubmission extends MotechBaseDataObject { public String getInstanceId() { return instanceId; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
FormSubmission extends MotechBaseDataObject { public String getInstanceId() { return instanceId; } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formInstance, long ...
@Test public void getSubFormByName() { Assert.assertNotNull(formSubmission.getSubFormByName("")); }
public SubFormData getSubFormByName(String name) { return formInstance.getSubFormByName(name); }
FormSubmission extends MotechBaseDataObject { public SubFormData getSubFormByName(String name) { return formInstance.getSubFormByName(name); } }
FormSubmission extends MotechBaseDataObject { public SubFormData getSubFormByName(String name) { return formInstance.getSubFormByName(name); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstan...
FormSubmission extends MotechBaseDataObject { public SubFormData getSubFormByName(String name) { return formInstance.getSubFormByName(name); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstan...
FormSubmission extends MotechBaseDataObject { public SubFormData getSubFormByName(String name) { return formInstance.getSubFormByName(name); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstan...
@Test public void assertequals() { Assert.assertEquals(formSubmission.equals(formSubmission), true); }
@Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(o, this); }
FormSubmission extends MotechBaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(o, this); } }
FormSubmission extends MotechBaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(o, this); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance ...
FormSubmission extends MotechBaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(o, this); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance ...
FormSubmission extends MotechBaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(o, this); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance ...
@Test public void testToJSONObjectShouldReturnCorrectJsonObject() throws JSONException { assertNull(JsonFormUtils.toJSONObject(null)); JSONObject actualJsonObj = JsonFormUtils.toJSONObject(multiStepForm); assertNotNull(actualJsonObj); assertEquals(actualJsonObj.toString(), new JSONObject(multiStepForm).toString()); }
public static JSONObject toJSONObject(String jsonString) { JSONObject jsonObject = null; try { jsonObject = jsonString == null ? null : new JSONObject(jsonString); } catch (JSONException e) { Timber.e(e); } return jsonObject; }
JsonFormUtils { public static JSONObject toJSONObject(String jsonString) { JSONObject jsonObject = null; try { jsonObject = jsonString == null ? null : new JSONObject(jsonString); } catch (JSONException e) { Timber.e(e); } return jsonObject; } }
JsonFormUtils { public static JSONObject toJSONObject(String jsonString) { JSONObject jsonObject = null; try { jsonObject = jsonString == null ? null : new JSONObject(jsonString); } catch (JSONException e) { Timber.e(e); } return jsonObject; } }
JsonFormUtils { public static JSONObject toJSONObject(String jsonString) { JSONObject jsonObject = null; try { jsonObject = jsonString == null ? null : new JSONObject(jsonString); } catch (JSONException e) { Timber.e(e); } return jsonObject; } static Client createBaseClient(JSONArray fields, FormTag formTag, String en...
JsonFormUtils { public static JSONObject toJSONObject(String jsonString) { JSONObject jsonObject = null; try { jsonObject = jsonString == null ? null : new JSONObject(jsonString); } catch (JSONException e) { Timber.e(e); } return jsonObject; } static Client createBaseClient(JSONArray fields, FormTag formTag, String en...
@Test public void asserthashCode() { Assert.assertNotNull(formSubmission.hashCode()); }
@Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "id"); }
FormSubmission extends MotechBaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "id"); } }
FormSubmission extends MotechBaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "id"); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance for...
FormSubmission extends MotechBaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "id"); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance for...
FormSubmission extends MotechBaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "id"); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance for...
@Test public void asserttoString() { Assert.assertNotNull(formSubmission.toString()); }
@Override public String toString() { return ToStringBuilder.reflectionToString(this); }
FormSubmission extends MotechBaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
FormSubmission extends MotechBaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formIn...
FormSubmission extends MotechBaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formIn...
FormSubmission extends MotechBaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } FormSubmission(); FormSubmission(String anmId, String instanceId, String formName, String entityId, long clientVersion, String formDataDefinitionVersion, FormInstance formIn...
@Test public void addAttribute() { Object value = new Object(); baseEntity.setAttributes(null); baseEntity.addAttribute(name, value); baseEntity.setAttributes(null); Assert.assertEquals(getAttribute(""), null); Map<String, Object> attributes = new HashMap<>(); attributes.put(name, value); baseEntity.setAttributes(attri...
public void addAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); }
BaseEntity extends BaseDataObject { public void addAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); } }
BaseEntity extends BaseDataObject { public void addAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(Str...
BaseEntity extends BaseDataObject { public void addAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(Str...
BaseEntity extends BaseDataObject { public void addAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(Str...
@Test public void assertwithBaseEntityId() { Assert.assertNotNull(baseEntity.withBaseEntityId(baseEntityId)); }
public BaseEntity withBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; return this; }
BaseEntity extends BaseDataObject { public BaseEntity withBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; return this; } }
BaseEntity extends BaseDataObject { public BaseEntity withBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String...
BaseEntity extends BaseDataObject { public BaseEntity withBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String...
BaseEntity extends BaseDataObject { public BaseEntity withBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String...
@Test public void assertwithIdentifiers() { Assert.assertNotNull(baseEntity.withIdentifiers(identifiers)); }
public BaseEntity withIdentifiers(Map<String, String> identifiers) { this.identifiers = identifiers; return this; }
BaseEntity extends BaseDataObject { public BaseEntity withIdentifiers(Map<String, String> identifiers) { this.identifiers = identifiers; return this; } }
BaseEntity extends BaseDataObject { public BaseEntity withIdentifiers(Map<String, String> identifiers) { this.identifiers = identifiers; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<Strin...
BaseEntity extends BaseDataObject { public BaseEntity withIdentifiers(Map<String, String> identifiers) { this.identifiers = identifiers; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<Strin...
BaseEntity extends BaseDataObject { public BaseEntity withIdentifiers(Map<String, String> identifiers) { this.identifiers = identifiers; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<Strin...
@Test public void assertwithIdentifier() { Assert.assertNotNull(baseEntity.withIdentifier("", "")); }
public BaseEntity withIdentifier(String identifierType, String identifier) { if (identifiers == null) { identifiers = new HashMap<>(); } identifiers.put(identifierType, identifier); return this; }
BaseEntity extends BaseDataObject { public BaseEntity withIdentifier(String identifierType, String identifier) { if (identifiers == null) { identifiers = new HashMap<>(); } identifiers.put(identifierType, identifier); return this; } }
BaseEntity extends BaseDataObject { public BaseEntity withIdentifier(String identifierType, String identifier) { if (identifiers == null) { identifiers = new HashMap<>(); } identifiers.put(identifierType, identifier); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntit...
BaseEntity extends BaseDataObject { public BaseEntity withIdentifier(String identifierType, String identifier) { if (identifiers == null) { identifiers = new HashMap<>(); } identifiers.put(identifierType, identifier); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntit...
BaseEntity extends BaseDataObject { public BaseEntity withIdentifier(String identifierType, String identifier) { if (identifiers == null) { identifiers = new HashMap<>(); } identifiers.put(identifierType, identifier); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntit...
@Test public void assertwithAddresses() { Assert.assertNotNull(baseEntity.withAddresses(addresses)); }
public BaseEntity withAddresses(List<Address> addresses) { this.addresses = addresses; return this; }
BaseEntity extends BaseDataObject { public BaseEntity withAddresses(List<Address> addresses) { this.addresses = addresses; return this; } }
BaseEntity extends BaseDataObject { public BaseEntity withAddresses(List<Address> addresses) { this.addresses = addresses; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> ide...
BaseEntity extends BaseDataObject { public BaseEntity withAddresses(List<Address> addresses) { this.addresses = addresses; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> ide...
BaseEntity extends BaseDataObject { public BaseEntity withAddresses(List<Address> addresses) { this.addresses = addresses; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> ide...
@Test public void assertwithAddress() { Address address = new Address(); Assert.assertNotNull(baseEntity.withAddress(address)); }
public BaseEntity withAddress(Address address) { if (addresses == null) { addresses = new ArrayList<>(); } addresses.add(address); return this; }
BaseEntity extends BaseDataObject { public BaseEntity withAddress(Address address) { if (addresses == null) { addresses = new ArrayList<>(); } addresses.add(address); return this; } }
BaseEntity extends BaseDataObject { public BaseEntity withAddress(Address address) { if (addresses == null) { addresses = new ArrayList<>(); } addresses.add(address); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(...
BaseEntity extends BaseDataObject { public BaseEntity withAddress(Address address) { if (addresses == null) { addresses = new ArrayList<>(); } addresses.add(address); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(...
BaseEntity extends BaseDataObject { public BaseEntity withAddress(Address address) { if (addresses == null) { addresses = new ArrayList<>(); } addresses.add(address); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(...
@Test public void assertwithAttributes() { Assert.assertNotNull(baseEntity.withAttributes(attributes)); }
public BaseEntity withAttributes(Map<String, Object> attributes) { this.attributes = attributes; return this; }
BaseEntity extends BaseDataObject { public BaseEntity withAttributes(Map<String, Object> attributes) { this.attributes = attributes; return this; } }
BaseEntity extends BaseDataObject { public BaseEntity withAttributes(Map<String, Object> attributes) { this.attributes = attributes; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, S...
BaseEntity extends BaseDataObject { public BaseEntity withAttributes(Map<String, Object> attributes) { this.attributes = attributes; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, S...
BaseEntity extends BaseDataObject { public BaseEntity withAttributes(Map<String, Object> attributes) { this.attributes = attributes; return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, S...
@Test public void assertwithAttribute() { Object value = new Object(); Assert.assertNotNull(baseEntity.withAttribute(name, value)); }
public BaseEntity withAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); return this; }
BaseEntity extends BaseDataObject { public BaseEntity withAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); return this; } }
BaseEntity extends BaseDataObject { public BaseEntity withAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifie...
BaseEntity extends BaseDataObject { public BaseEntity withAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifie...
BaseEntity extends BaseDataObject { public BaseEntity withAttribute(String name, Object value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(name, value); return this; } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifie...
@Test public void testValueShouldGetCorrectValue() throws JSONException { String value = JsonFormUtils.value(new JSONArray(STEP_1_FIELDS), "entity", "entity_id"); assertEquals("Secondary", value); assertNull(JsonFormUtils.value(new JSONArray(STEP_1_FIELDS), "entity1", "entity_id1")); }
@Nullable public static String value(JSONArray jsonArray, String entity, String entityId) { for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = getJSONObject(jsonArray, i); if (StringUtils.isNotBlank(getString(jsonObject, ENTITY_ID))) { continue; } String entityVal = getString(jsonObject, OPENMRS_ENT...
JsonFormUtils { @Nullable public static String value(JSONArray jsonArray, String entity, String entityId) { for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = getJSONObject(jsonArray, i); if (StringUtils.isNotBlank(getString(jsonObject, ENTITY_ID))) { continue; } String entityVal = getString(jsonObj...
JsonFormUtils { @Nullable public static String value(JSONArray jsonArray, String entity, String entityId) { for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = getJSONObject(jsonArray, i); if (StringUtils.isNotBlank(getString(jsonObject, ENTITY_ID))) { continue; } String entityVal = getString(jsonObj...
JsonFormUtils { @Nullable public static String value(JSONArray jsonArray, String entity, String entityId) { for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = getJSONObject(jsonArray, i); if (StringUtils.isNotBlank(getString(jsonObject, ENTITY_ID))) { continue; } String entityVal = getString(jsonObj...
JsonFormUtils { @Nullable public static String value(JSONArray jsonArray, String entity, String entityId) { for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = getJSONObject(jsonArray, i); if (StringUtils.isNotBlank(getString(jsonObject, ENTITY_ID))) { continue; } String entityVal = getString(jsonObj...
@Test public void assertequals() { Object o = new BaseEntity(); Assert.assertEquals(baseEntity.equals(o), false); }
@Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); }
BaseEntity extends BaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } }
BaseEntity extends BaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, Stri...
BaseEntity extends BaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, Stri...
BaseEntity extends BaseDataObject { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, Stri...
@Test public void asserthashCode() { Assert.assertNotNull(baseEntity.hashCode()); }
@Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); }
BaseEntity extends BaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } }
BaseEntity extends BaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> ident...
BaseEntity extends BaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> ident...
BaseEntity extends BaseDataObject { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> ident...
@Test public void asserttoString() { Assert.assertNotNull(baseEntity.toString()); }
@Override public String toString() { return ToStringBuilder.reflectionToString(this); }
BaseEntity extends BaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
BaseEntity extends BaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> identifiers, Map<...
BaseEntity extends BaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> identifiers, Map<...
BaseEntity extends BaseDataObject { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } protected BaseEntity(); BaseEntity(String baseEntityId); BaseEntity(String baseEntityId, Map<String, String> identifiers); BaseEntity(String baseEntityId, Map<String, String> identifiers, Map<...
@Test public void setUsername() { user.setUsername(username); Assert.assertEquals(getUsername(), username); }
public void setUsername(String username) { this.username = username; }
User extends BaseEntity { public void setUsername(String username) { this.username = username; } }
User extends BaseEntity { public void setUsername(String username) { this.username = username; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, ...
User extends BaseEntity { public void setUsername(String username) { this.username = username; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, ...
User extends BaseEntity { public void setUsername(String username) { this.username = username; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, ...
@Test public void setPassword() { user.setPassword(password); Assert.assertEquals(getPassword(), password); }
public void setPassword(String password) { this.password = password; }
User extends BaseEntity { public void setPassword(String password) { this.password = password; } }
User extends BaseEntity { public void setPassword(String password) { this.password = password; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, ...
User extends BaseEntity { public void setPassword(String password) { this.password = password; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, ...
User extends BaseEntity { public void setPassword(String password) { this.password = password; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, ...
@Test public void setSalt() { user.setSalt(salt); Assert.assertEquals(getSalt(), salt); }
public void setSalt(String salt) { this.salt = salt; }
User extends BaseEntity { public void setSalt(String salt) { this.salt = salt; } }
User extends BaseEntity { public void setSalt(String salt) { this.salt = salt; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<String> rol...
User extends BaseEntity { public void setSalt(String salt) { this.salt = salt; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<String> rol...
User extends BaseEntity { public void setSalt(String salt) { this.salt = salt; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<String> rol...
@Test public void setStatus() { user.setStatus(status); Assert.assertEquals(getStatus(), status); }
public void setStatus(String status) { this.status = status; }
User extends BaseEntity { public void setStatus(String status) { this.status = status; } }
User extends BaseEntity { public void setStatus(String status) { this.status = status; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<Str...
User extends BaseEntity { public void setStatus(String status) { this.status = status; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<Str...
User extends BaseEntity { public void setStatus(String status) { this.status = status; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<Str...
@Test public void setRoles() { user.setRoles(list); Assert.assertEquals(getRoles(), list); }
public void setRoles(List<String> roles) { this.roles = roles; }
User extends BaseEntity { public void setRoles(List<String> roles) { this.roles = roles; } }
User extends BaseEntity { public void setRoles(List<String> roles) { this.roles = roles; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<S...
User extends BaseEntity { public void setRoles(List<String> roles) { this.roles = roles; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<S...
User extends BaseEntity { public void setRoles(List<String> roles) { this.roles = roles; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, List<S...
@Test public void addRole() { user.setRoles(null); user.addRole(role); Assert.assertEquals(getRoles().get(0), role); }
@JsonIgnore public void addRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); }
User extends BaseEntity { @JsonIgnore public void addRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); } }
User extends BaseEntity { @JsonIgnore public void addRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String passw...
User extends BaseEntity { @JsonIgnore public void addRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String passw...
User extends BaseEntity { @JsonIgnore public void addRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String passw...
@Test public void removeRole() { user.setRoles(list); user.removeRole(role); Assert.assertEquals(getRoles().contains(role), false); }
@JsonIgnore public boolean removeRole(String role) { return roles.remove(role); }
User extends BaseEntity { @JsonIgnore public boolean removeRole(String role) { return roles.remove(role); } }
User extends BaseEntity { @JsonIgnore public boolean removeRole(String role) { return roles.remove(role); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { @JsonIgnore public boolean removeRole(String role) { return roles.remove(role); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { @JsonIgnore public boolean removeRole(String role) { return roles.remove(role); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
@Test public void testGetFieldValueShouldGetCorrectValue() throws JSONException { String value = JsonFormUtils.getFieldValue(new JSONArray(STEP_1_FIELDS), "educ_level"); assertEquals("Secondary", value); assertNull(JsonFormUtils.getFieldValue(new JSONArray(STEP_1_FIELDS), "school_level")); }
public static String getFieldValue(JSONArray jsonArray, FormEntityConstants.Person person) { if (isBlankJsonArray(jsonArray)) { return null; } if (person == null) { return null; } return value(jsonArray, person.entity(), person.entityId()); }
JsonFormUtils { public static String getFieldValue(JSONArray jsonArray, FormEntityConstants.Person person) { if (isBlankJsonArray(jsonArray)) { return null; } if (person == null) { return null; } return value(jsonArray, person.entity(), person.entityId()); } }
JsonFormUtils { public static String getFieldValue(JSONArray jsonArray, FormEntityConstants.Person person) { if (isBlankJsonArray(jsonArray)) { return null; } if (person == null) { return null; } return value(jsonArray, person.entity(), person.entityId()); } }
JsonFormUtils { public static String getFieldValue(JSONArray jsonArray, FormEntityConstants.Person person) { if (isBlankJsonArray(jsonArray)) { return null; } if (person == null) { return null; } return value(jsonArray, person.entity(), person.entityId()); } static Client createBaseClient(JSONArray fields, FormTag for...
JsonFormUtils { public static String getFieldValue(JSONArray jsonArray, FormEntityConstants.Person person) { if (isBlankJsonArray(jsonArray)) { return null; } if (person == null) { return null; } return value(jsonArray, person.entity(), person.entityId()); } static Client createBaseClient(JSONArray fields, FormTag for...
@Test public void hasRole() { user.setRoles(list); Assert.assertEquals(user.hasRole(role), true); Assert.assertEquals(user.hasRole("invalid"), false); }
@JsonIgnore public boolean hasRole(String role) { if (roles != null) { for (String r : roles) { if (role.equalsIgnoreCase(r)) { return true; } } } return false; }
User extends BaseEntity { @JsonIgnore public boolean hasRole(String role) { if (roles != null) { for (String r : roles) { if (role.equalsIgnoreCase(r)) { return true; } } } return false; } }
User extends BaseEntity { @JsonIgnore public boolean hasRole(String role) { if (roles != null) { for (String r : roles) { if (role.equalsIgnoreCase(r)) { return true; } } } return false; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(Str...
User extends BaseEntity { @JsonIgnore public boolean hasRole(String role) { if (roles != null) { for (String r : roles) { if (role.equalsIgnoreCase(r)) { return true; } } } return false; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(Str...
User extends BaseEntity { @JsonIgnore public boolean hasRole(String role) { if (roles != null) { for (String r : roles) { if (role.equalsIgnoreCase(r)) { return true; } } } return false; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(Str...
@Test public void isDefaultAdmin() { user.setRoles(list); user.setUsername("admin"); Assert.assertEquals(user.isDefaultAdmin(), true); }
@JsonIgnore public boolean isDefaultAdmin() { return (username.equalsIgnoreCase("admin") || username.equalsIgnoreCase("administrator")) && (hasRole("admin") || hasRole("administrator")); }
User extends BaseEntity { @JsonIgnore public boolean isDefaultAdmin() { return (username.equalsIgnoreCase("admin") || username.equalsIgnoreCase("administrator")) && (hasRole("admin") || hasRole("administrator")); } }
User extends BaseEntity { @JsonIgnore public boolean isDefaultAdmin() { return (username.equalsIgnoreCase("admin") || username.equalsIgnoreCase("administrator")) && (hasRole("admin") || hasRole("administrator")); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String passwor...
User extends BaseEntity { @JsonIgnore public boolean isDefaultAdmin() { return (username.equalsIgnoreCase("admin") || username.equalsIgnoreCase("administrator")) && (hasRole("admin") || hasRole("administrator")); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String passwor...
User extends BaseEntity { @JsonIgnore public boolean isDefaultAdmin() { return (username.equalsIgnoreCase("admin") || username.equalsIgnoreCase("administrator")) && (hasRole("admin") || hasRole("administrator")); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String passwor...
@Test public void hasAdminRights() { user.setRoles(null); user.setUsername("NOTadmin"); Assert.assertEquals(user.hasAdminRights(), false); user.setRoles(list); user.setUsername("admin"); Assert.assertEquals(user.hasAdminRights(), true); }
@JsonIgnore public boolean hasAdminRights() { return isDefaultAdmin() || hasRole("admin") || hasRole("administrator"); }
User extends BaseEntity { @JsonIgnore public boolean hasAdminRights() { return isDefaultAdmin() || hasRole("admin") || hasRole("administrator"); } }
User extends BaseEntity { @JsonIgnore public boolean hasAdminRights() { return isDefaultAdmin() || hasRole("admin") || hasRole("administrator"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String ...
User extends BaseEntity { @JsonIgnore public boolean hasAdminRights() { return isDefaultAdmin() || hasRole("admin") || hasRole("administrator"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String ...
User extends BaseEntity { @JsonIgnore public boolean hasAdminRights() { return isDefaultAdmin() || hasRole("admin") || hasRole("administrator"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String ...
@Test public void setPermissions() { user.setPermissions(list); Assert.assertEquals(getPermissions(), list); }
public void setPermissions(List<String> permissions) { this.permissions = permissions; }
User extends BaseEntity { public void setPermissions(List<String> permissions) { this.permissions = permissions; } }
User extends BaseEntity { public void setPermissions(List<String> permissions) { this.permissions = permissions; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public void setPermissions(List<String> permissions) { this.permissions = permissions; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public void setPermissions(List<String> permissions) { this.permissions = permissions; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
@Test public void addPermission() { user.setPermissions(null); user.addPermission(permission); Assert.assertEquals(getPermissions().get(0), permission); }
@JsonIgnore public void addPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); }
User extends BaseEntity { @JsonIgnore public void addPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); } }
User extends BaseEntity { @JsonIgnore public void addPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEnt...
User extends BaseEntity { @JsonIgnore public void addPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEnt...
User extends BaseEntity { @JsonIgnore public void addPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEnt...
@Test public void removePermission() { user.setPermissions(null); user.addPermission(permission); Assert.assertEquals(user.removePermission(permission), true); Assert.assertEquals(user.removePermission(permission), false); }
public boolean removePermission(String permission) { return permissions.remove(permission); }
User extends BaseEntity { public boolean removePermission(String permission) { return permissions.remove(permission); } }
User extends BaseEntity { public boolean removePermission(String permission) { return permissions.remove(permission); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, Stri...
User extends BaseEntity { public boolean removePermission(String permission) { return permissions.remove(permission); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, Stri...
User extends BaseEntity { public boolean removePermission(String permission) { return permissions.remove(permission); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, Stri...
@Test public void hasPermission() { user.setPermissions(list); Assert.assertEquals(user.hasPermission(permission), false); Assert.assertEquals(user.hasPermission(role), true); }
@JsonIgnore public boolean hasPermission(String permission) { if (permissions != null) { for (String p : permissions) { if (permission.equalsIgnoreCase(p)) { return true; } } } return false; }
User extends BaseEntity { @JsonIgnore public boolean hasPermission(String permission) { if (permissions != null) { for (String p : permissions) { if (permission.equalsIgnoreCase(p)) { return true; } } } return false; } }
User extends BaseEntity { @JsonIgnore public boolean hasPermission(String permission) { if (permissions != null) { for (String p : permissions) { if (permission.equalsIgnoreCase(p)) { return true; } } } return false; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String pas...
User extends BaseEntity { @JsonIgnore public boolean hasPermission(String permission) { if (permissions != null) { for (String p : permissions) { if (permission.equalsIgnoreCase(p)) { return true; } } } return false; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String pas...
User extends BaseEntity { @JsonIgnore public boolean hasPermission(String permission) { if (permissions != null) { for (String p : permissions) { if (permission.equalsIgnoreCase(p)) { return true; } } } return false; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String pas...
@Test public void withUsername() { Assert.assertNotNull(user.withUsername(username)); }
public User withUsername(String username) { this.username = username; return this; }
User extends BaseEntity { public User withUsername(String username) { this.username = username; return this; } }
User extends BaseEntity { public User withUsername(String username) { this.username = username; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public User withUsername(String username) { this.username = username; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public User withUsername(String username) { this.username = username; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
@Test public void withPassword() { Assert.assertNotNull(user.withPassword(password)); }
public User withPassword(String password) { this.password = password; return this; }
User extends BaseEntity { public User withPassword(String password) { this.password = password; return this; } }
User extends BaseEntity { public User withPassword(String password) { this.password = password; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public User withPassword(String password) { this.password = password; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public User withPassword(String password) { this.password = password; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
@Test public void withSalt() { Assert.assertNotNull(user.withSalt(salt)); }
public User withSalt(String salt) { this.salt = salt; return this; }
User extends BaseEntity { public User withSalt(String salt) { this.salt = salt; return this; } }
User extends BaseEntity { public User withSalt(String salt) { this.salt = salt; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, Li...
User extends BaseEntity { public User withSalt(String salt) { this.salt = salt; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, Li...
User extends BaseEntity { public User withSalt(String salt) { this.salt = salt; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String status, Li...
@Test public void testGetJSONObjectShouldGetCorrectObject() throws JSONException { JSONArray jsonArray = new JSONArray(STEP_1_FIELDS); JSONObject actualJsonObj = JsonFormUtils.getJSONObject(jsonArray, 1); assertEquals(jsonArray.get(1), actualJsonObj); assertNull(JsonFormUtils.getJSONObject(jsonArray, 100)); }
@Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); }
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } }
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } }
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(JSONArray fields, JSONObject meta...
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(JSONArray fields, JSONObject meta...
@Test(expected = QueryComposer.InvalidQueryException.class) public void testGenerator() throws QueryComposer.InvalidQueryException { QueryComposer generator = new QueryComposer(); generator.generateQuery(); }
public String generateQuery() throws InvalidQueryException { if (columns == null && mainSelect == null) throw new InvalidQueryException("Missing columns statement"); if (mainTable == null && mainSelect == null) throw new InvalidQueryException("Missing main table"); StringBuilder builder = new StringBuilder(getMainSelec...
QueryComposer { public String generateQuery() throws InvalidQueryException { if (columns == null && mainSelect == null) throw new InvalidQueryException("Missing columns statement"); if (mainTable == null && mainSelect == null) throw new InvalidQueryException("Missing main table"); StringBuilder builder = new StringBuil...
QueryComposer { public String generateQuery() throws InvalidQueryException { if (columns == null && mainSelect == null) throw new InvalidQueryException("Missing columns statement"); if (mainTable == null && mainSelect == null) throw new InvalidQueryException("Missing main table"); StringBuilder builder = new StringBuil...
QueryComposer { public String generateQuery() throws InvalidQueryException { if (columns == null && mainSelect == null) throw new InvalidQueryException("Missing columns statement"); if (mainTable == null && mainSelect == null) throw new InvalidQueryException("Missing main table"); StringBuilder builder = new StringBuil...
QueryComposer { public String generateQuery() throws InvalidQueryException { if (columns == null && mainSelect == null) throw new InvalidQueryException("Missing columns statement"); if (mainTable == null && mainSelect == null) throw new InvalidQueryException("Missing main table"); StringBuilder builder = new StringBuil...
@Test public void withStatus() { Assert.assertNotNull(user.withStatus(status)); }
public User withStatus(String status) { this.status = status; return this; }
User extends BaseEntity { public User withStatus(String status) { this.status = status; return this; } }
User extends BaseEntity { public User withStatus(String status) { this.status = status; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String st...
User extends BaseEntity { public User withStatus(String status) { this.status = status; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String st...
User extends BaseEntity { public User withStatus(String status) { this.status = status; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String st...
@Test public void withRoles() { Assert.assertNotNull(user.withRoles(list)); }
public User withRoles(List<String> roles) { this.roles = roles; return this; }
User extends BaseEntity { public User withRoles(List<String> roles) { this.roles = roles; return this; } }
User extends BaseEntity { public User withRoles(List<String> roles) { this.roles = roles; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public User withRoles(List<String> roles) { this.roles = roles; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { public User withRoles(List<String> roles) { this.roles = roles; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
@Test public void withRole() { Assert.assertNotNull(user.withRole(role)); }
public User withRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); return this; }
User extends BaseEntity { public User withRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); return this; } }
User extends BaseEntity { public User withRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String pas...
User extends BaseEntity { public User withRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String pas...
User extends BaseEntity { public User withRole(String role) { if (roles == null) { roles = new ArrayList<>(); } roles.add(role); return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String pas...
@Test public void withPermissions() { Assert.assertNotNull(user.withPermissions(list)); }
public User withPermissions(List<String> permissions) { this.permissions = permissions; return this; }
User extends BaseEntity { public User withPermissions(List<String> permissions) { this.permissions = permissions; return this; } }
User extends BaseEntity { public User withPermissions(List<String> permissions) { this.permissions = permissions; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String s...
User extends BaseEntity { public User withPermissions(List<String> permissions) { this.permissions = permissions; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String s...
User extends BaseEntity { public User withPermissions(List<String> permissions) { this.permissions = permissions; return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String s...
@Test public void withPermission() { Assert.assertNotNull(user.withPermission(permission)); }
public User withPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); return this; }
User extends BaseEntity { public User withPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); return this; } }
User extends BaseEntity { public User withPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseE...
User extends BaseEntity { public User withPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseE...
User extends BaseEntity { public User withPermission(String permission) { if (permissions == null) { permissions = new ArrayList<>(); } permissions.add(permission); return this; } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseE...
@Test public void assertequals() { Assert.assertEquals(user.equals(user), true); }
@Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); }
User extends BaseEntity { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } }
User extends BaseEntity { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, St...
User extends BaseEntity { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, St...
User extends BaseEntity { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "_id", "_rev"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, St...
@Test public void asserthashCode() { Assert.assertNotNull(user.hashCode()); }
@Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); }
User extends BaseEntity { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } }
User extends BaseEntity { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt...
User extends BaseEntity { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt...
User extends BaseEntity { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "_id", "_rev"); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt...
@Test public void asserttoString() { Assert.assertNotNull(user.toString()); }
@Override public String toString() { return ToStringBuilder.reflectionToString(this); }
User extends BaseEntity { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
User extends BaseEntity { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
User extends BaseEntity { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } protected User(); User(String baseEntityId); User(String baseEntityId, String username, String password, String salt); User(String baseEntityId, String username, String password, String salt, String ...
@Test public void assertwithAddressType() { String addressType = ""; Assert.assertNotNull(address.withAddressType(addressType)); }
public Address withAddressType(String addressType) { this.addressType = addressType; return this; }
Address { public Address withAddressType(String addressType) { this.addressType = addressType; return this; } }
Address { public Address withAddressType(String addressType) { this.addressType = addressType; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
Address { public Address withAddressType(String addressType) { this.addressType = addressType; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
Address { public Address withAddressType(String addressType) { this.addressType = addressType; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
@Test public void assertwithStartDate() { Date startDate = new Date(0l); Assert.assertNotNull(address.withStartDate(startDate)); }
public Address withStartDate(Date startDate) { this.startDate = startDate; return this; }
Address { public Address withStartDate(Date startDate) { this.startDate = startDate; return this; } }
Address { public Address withStartDate(Date startDate) { this.startDate = startDate; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, ...
Address { public Address withStartDate(Date startDate) { this.startDate = startDate; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, ...
Address { public Address withStartDate(Date startDate) { this.startDate = startDate; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, ...
@Test public void testGetJSONArrayShouldGetCorrectJSONArray() throws JSONException { JSONObject jsonObject = new JSONObject(JSON_ARRAY); assertEquals(jsonObject.getJSONArray("json_array"), JsonFormUtils.getJSONArray(jsonObject, "json_array")); assertNull( JsonFormUtils.getJSONArray(jsonObject, "json_array_1")); }
@Nullable public static JSONArray getJSONArray(JSONObject jsonObject, String field) { return isBlankJsonObject(jsonObject) ? null : jsonObject.optJSONArray(field); }
JsonFormUtils { @Nullable public static JSONArray getJSONArray(JSONObject jsonObject, String field) { return isBlankJsonObject(jsonObject) ? null : jsonObject.optJSONArray(field); } }
JsonFormUtils { @Nullable public static JSONArray getJSONArray(JSONObject jsonObject, String field) { return isBlankJsonObject(jsonObject) ? null : jsonObject.optJSONArray(field); } }
JsonFormUtils { @Nullable public static JSONArray getJSONArray(JSONObject jsonObject, String field) { return isBlankJsonObject(jsonObject) ? null : jsonObject.optJSONArray(field); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(JSONArray fields, JSONObject...
JsonFormUtils { @Nullable public static JSONArray getJSONArray(JSONObject jsonObject, String field) { return isBlankJsonObject(jsonObject) ? null : jsonObject.optJSONArray(field); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(JSONArray fields, JSONObject...
@Test public void assertwithEndDate() { Date endDate = new Date(0l); Assert.assertNotNull(address.withEndDate(endDate)); }
public Address withEndDate(Date endDate) { this.endDate = endDate; return this; }
Address { public Address withEndDate(Date endDate) { this.endDate = endDate; return this; } }
Address { public Address withEndDate(Date endDate) { this.endDate = endDate; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String c...
Address { public Address withEndDate(Date endDate) { this.endDate = endDate; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String c...
Address { public Address withEndDate(Date endDate) { this.endDate = endDate; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String c...
@Test public void assertwithAddressFields() { Map<String, String> addressFields = new HashMap<>(); Assert.assertNotNull(address.withAddressFields(addressFields)); }
public Address withAddressFields(Map<String, String> addressFields) { this.addressFields = addressFields; return this; }
Address { public Address withAddressFields(Map<String, String> addressFields) { this.addressFields = addressFields; return this; } }
Address { public Address withAddressFields(Map<String, String> addressFields) { this.addressFields = addressFields; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
Address { public Address withAddressFields(Map<String, String> addressFields) { this.addressFields = addressFields; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
Address { public Address withAddressFields(Map<String, String> addressFields) { this.addressFields = addressFields; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
@Test public void assertwithLatitude() { Assert.assertNotNull(address.withLatitude(latitude)); }
public Address withLatitude(String latitude) { this.latitude = latitude; return this; }
Address { public Address withLatitude(String latitude) { this.latitude = latitude; return this; } }
Address { public Address withLatitude(String latitude) { this.latitude = latitude; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
Address { public Address withLatitude(String latitude) { this.latitude = latitude; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
Address { public Address withLatitude(String latitude) { this.latitude = latitude; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
@Test public void assertwithLongitude() { Assert.assertNotNull(address.withLongitude(longitude)); }
public Address withLongitude(String longitude) { this.longitude = longitude; return this; }
Address { public Address withLongitude(String longitude) { this.longitude = longitude; return this; } }
Address { public Address withLongitude(String longitude) { this.longitude = longitude; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince...
Address { public Address withLongitude(String longitude) { this.longitude = longitude; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince...
Address { public Address withLongitude(String longitude) { this.longitude = longitude; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince...
@Test public void assertwithGeopoint() { String geopoint = mockString; Assert.assertNotNull(address.withGeopoint(geopoint)); }
public Address withGeopoint(String geopoint) { this.geopoint = geopoint; return this; }
Address { public Address withGeopoint(String geopoint) { this.geopoint = geopoint; return this; } }
Address { public Address withGeopoint(String geopoint) { this.geopoint = geopoint; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
Address { public Address withGeopoint(String geopoint) { this.geopoint = geopoint; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
Address { public Address withGeopoint(String geopoint) { this.geopoint = geopoint; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
@Test public void assertwithPostalCode() { String postalCode = mockString; Assert.assertNotNull(address.withPostalCode(postalCode)); }
public Address withPostalCode(String postalCode) { this.postalCode = postalCode; return this; }
Address { public Address withPostalCode(String postalCode) { this.postalCode = postalCode; return this; } }
Address { public Address withPostalCode(String postalCode) { this.postalCode = postalCode; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProv...
Address { public Address withPostalCode(String postalCode) { this.postalCode = postalCode; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProv...
Address { public Address withPostalCode(String postalCode) { this.postalCode = postalCode; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProv...
@Test public void assertwithTown() { String town = mockString; Assert.assertNotNull(address.withTown(town)); }
public Address withTown(String town) { this.town = town; return this; }
Address { public Address withTown(String town) { this.town = town; return this; } }
Address { public Address withTown(String town) { this.town = town; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String country); }
Address { public Address withTown(String town) { this.town = town; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String country); S...
Address { public Address withTown(String town) { this.town = town; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String country); S...
@Test public void assertwithSubDistrict() { String subDistrict = mockString; Assert.assertNotNull(address.withSubDistrict(subDistrict)); }
public Address withSubDistrict(String subDistrict) { this.subDistrict = subDistrict; return this; }
Address { public Address withSubDistrict(String subDistrict) { this.subDistrict = subDistrict; return this; } }
Address { public Address withSubDistrict(String subDistrict) { this.subDistrict = subDistrict; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
Address { public Address withSubDistrict(String subDistrict) { this.subDistrict = subDistrict; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
Address { public Address withSubDistrict(String subDistrict) { this.subDistrict = subDistrict; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
@Test public void assertwithCountyDistrict() { String countyDistrict = mockString; Assert.assertNotNull(address.withCountyDistrict(countyDistrict)); }
public Address withCountyDistrict(String countyDistrict) { this.countyDistrict = countyDistrict; return this; }
Address { public Address withCountyDistrict(String countyDistrict) { this.countyDistrict = countyDistrict; return this; } }
Address { public Address withCountyDistrict(String countyDistrict) { this.countyDistrict = countyDistrict; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
Address { public Address withCountyDistrict(String countyDistrict) { this.countyDistrict = countyDistrict; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
Address { public Address withCountyDistrict(String countyDistrict) { this.countyDistrict = countyDistrict; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
@Test public void assertwithCityVillage() { String cityVillage = mockString; Assert.assertNotNull(address.withCityVillage(cityVillage)); }
public Address withCityVillage(String cityVillage) { this.cityVillage = cityVillage; return this; }
Address { public Address withCityVillage(String cityVillage) { this.cityVillage = cityVillage; return this; } }
Address { public Address withCityVillage(String cityVillage) { this.cityVillage = cityVillage; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
Address { public Address withCityVillage(String cityVillage) { this.cityVillage = cityVillage; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
Address { public Address withCityVillage(String cityVillage) { this.cityVillage = cityVillage; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String state...
@Test public void testGetJSONObjectByFieldShouldGetCorrectObject() throws JSONException { JSONObject jsonObject = new JSONObject(JSON_OBJ); JSONObject actualJsonObj = JsonFormUtils.getJSONObject(jsonObject, "secondary"); assertEquals(jsonObject.optJSONObject("secondary"), actualJsonObj); assertNull(JsonFormUtils.getJSO...
@Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); }
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } }
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } }
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(JSONArray fields, JSONObject meta...
JsonFormUtils { @Nullable public static JSONObject getJSONObject(JSONArray jsonArray, int index) { return isBlankJsonArray(jsonArray) ? null : jsonArray.optJSONObject(index); } static Client createBaseClient(JSONArray fields, FormTag formTag, String entityId); static Event createEvent(JSONArray fields, JSONObject meta...
@Test public void assertwithStateProvince() { String stateProvince = mockString; Assert.assertNotNull(address.withStateProvince(stateProvince)); }
public Address withStateProvince(String stateProvince) { this.stateProvince = stateProvince; return this; }
Address { public Address withStateProvince(String stateProvince) { this.stateProvince = stateProvince; return this; } }
Address { public Address withStateProvince(String stateProvince) { this.stateProvince = stateProvince; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
Address { public Address withStateProvince(String stateProvince) { this.stateProvince = stateProvince; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
Address { public Address withStateProvince(String stateProvince) { this.stateProvince = stateProvince; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String ...
@Test public void assertwithCountry() { String country = mockString; Assert.assertNotNull(address.withCountry(country)); }
public Address withCountry(String country) { this.country = country; return this; }
Address { public Address withCountry(String country) { this.country = country; return this; } }
Address { public Address withCountry(String country) { this.country = country; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String...
Address { public Address withCountry(String country) { this.country = country; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String...
Address { public Address withCountry(String country) { this.country = country; return this; } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, String...
@Test public void assertgetAddressField() { Assert.assertEquals(address.getAddressField(AddressField.CITY), null); }
public String getAddressField(String addressField) { return addressFields.get(addressField); }
Address { public String getAddressField(String addressField) { return addressFields.get(addressField); } }
Address { public String getAddressField(String addressField) { return addressFields.get(addressField); } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvi...
Address { public String getAddressField(String addressField) { return addressFields.get(addressField); } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvi...
Address { public String getAddressField(String addressField) { return addressFields.get(addressField); } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvi...
@Test public void asserttoString() { Assert.assertNotNull(address.toString()); }
@Override public String toString() { return ToStringBuilder.reflectionToString(this); }
Address { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
Address { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
Address { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
Address { @Override public String toString() { return ToStringBuilder.reflectionToString(this); } Address(); Address(String addressType, Date startDate, Date endDate, Map<String, String> addressFields, String latitude, String longitude, String postalCode, String stateProvince, St...
@Test public void assertTestCreateFormSubmissionMap() throws Exception { InputStream formDefinitionStream = new FileInputStream(getFileFromPath(this, formDefinition)); InputStream modelStream = new FileInputStream(getFileFromPath(this, model)); InputStream formJSONStream = new FileInputStream(getFileFromPath(this, form...
public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXmlData(fs.formName()); J...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
@Test public void assertTestCreateFormSubmissionMapMultiSelect() throws Exception { InputStream formDefinitionStream = new FileInputStream(getFileFromPath(this, formDefinition)); InputStream modelStream = new FileInputStream(getFileFromPath(this, model)); InputStream formJSONStream = new FileInputStream(getFileFromPath...
public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXmlData(fs.formName()); J...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
FormAttributeParser { public FormSubmissionMap createFormSubmissionMap(FormSubmission fs) throws JsonIOException, JsonSyntaxException, ParserConfigurationException, SAXException, IOException, XPathExpressionException { JsonObject formDefinitionData = getFormDefinitionData(fs.formName()); Document modelXml = getModelXml...
@Test public void assertGetFieldname() throws Exception { InputStream formDefinitionStream = new FileInputStream(getFileFromPath(this, formDefinition)); InputStream modelStream = new FileInputStream(getFileFromPath(this, model)); InputStream formJSONStream = new FileInputStream(getFileFromPath(this, formMultiJSON)); Li...
public String getFieldName(Map<String, String> attributeMap, FormSubmission formSubmission) throws JsonSyntaxException, IOException, XPathExpressionException, ParserConfigurationException, SAXException { String fieldName = ""; Node fieldTag = getFieldTagFromModel(attributeMap, formSubmission); String bind = getXPath(fi...
FormAttributeParser { public String getFieldName(Map<String, String> attributeMap, FormSubmission formSubmission) throws JsonSyntaxException, IOException, XPathExpressionException, ParserConfigurationException, SAXException { String fieldName = ""; Node fieldTag = getFieldTagFromModel(attributeMap, formSubmission); Str...
FormAttributeParser { public String getFieldName(Map<String, String> attributeMap, FormSubmission formSubmission) throws JsonSyntaxException, IOException, XPathExpressionException, ParserConfigurationException, SAXException { String fieldName = ""; Node fieldTag = getFieldTagFromModel(attributeMap, formSubmission); Str...
FormAttributeParser { public String getFieldName(Map<String, String> attributeMap, FormSubmission formSubmission) throws JsonSyntaxException, IOException, XPathExpressionException, ParserConfigurationException, SAXException { String fieldName = ""; Node fieldTag = getFieldTagFromModel(attributeMap, formSubmission); Str...
FormAttributeParser { public String getFieldName(Map<String, String> attributeMap, FormSubmission formSubmission) throws JsonSyntaxException, IOException, XPathExpressionException, ParserConfigurationException, SAXException { String fieldName = ""; Node fieldTag = getFieldTagFromModel(attributeMap, formSubmission); Str...