@Test public void testIsValidatedSearch_When_City_Length_Less_Than_Three() { Boolean validateCall = providerSearchLookupServiceImpl .isValidatedSearch("MD", "columbia", null, null, null, null, null, "smith", null); assertEquals(false, validateCall); }
@Override public boolean isValidatedSearch(String usstate, String city, String zipcode, String gender, String specialty, String phone, String firstname, String lastname, String facilityName) { boolean validateCall = true; if (usstate == null && city == null && zipcode == null && phone == null && specialty == null && firstname == null && lastname == null && facilityName == null && gender == null) validateCall = false; if (usstate != null && zipcode != null) validateCall = false; if (lastname == null && facilityName == null) { validateCall = false; } if (zipcode == null && city == null && usstate == null) { validateCall = false; } if (usstate != null) { if (usstate.matches("[a-zA-Z][a-zA-Z]") == true) { List<LookupDto> stateCodes = stateCodeService .findAllStateCodes(); boolean isValidStateCode = false; for (LookupDto stateCode : stateCodes) { if (usstate.compareToIgnoreCase(stateCode.getCode()) == 0) { isValidStateCode = true; break; } } if (isValidStateCode != true) { validateCall = false; } } else validateCall = false; } if (city != null && city.length() < 2) validateCall = false; if (zipcode != null && zipcode.length() < 5) validateCall = false; if (specialty != null && specialty.length() < 3) validateCall = false; if (phone != null && phone.length() != 10) validateCall = false; if (firstname != null && firstname.length() < 2) validateCall = false; if (lastname != null && lastname.length() < 2) validateCall = false; if (facilityName != null && facilityName.length() < 2) validateCall = false; if (city != null && usstate == null) validateCall = false; return validateCall; }
ProviderSearchLookupServiceImpl extends
		gov.samhsa.consent2share.service.provider.ProviderSearchLookupServiceImpl { @Override public boolean isValidatedSearch(String usstate, String city, String zipcode, String gender, String specialty, String phone, String firstname, String lastname, String facilityName) { boolean validateCall = true; if (usstate == null && city == null && zipcode == null && phone == null && specialty == null && firstname == null && lastname == null && facilityName == null && gender == null) validateCall = false; if (usstate != null && zipcode != null) validateCall = false; if (lastname == null && facilityName == null) { validateCall = false; } if (zipcode == null && city == null && usstate == null) { validateCall = false; } if (usstate != null) { if (usstate.matches("[a-zA-Z][a-zA-Z]") == true) { List<LookupDto> stateCodes = stateCodeService .findAllStateCodes(); boolean isValidStateCode = false; for (LookupDto stateCode : stateCodes) { if (usstate.compareToIgnoreCase(stateCode.getCode()) == 0) { isValidStateCode = true; break; } } if (isValidStateCode != true) { validateCall = false; } } else validateCall = false; } if (city != null && city.length() < 2) validateCall = false; if (zipcode != null && zipcode.length() < 5) validateCall = false; if (specialty != null && specialty.length() < 3) validateCall = false; if (phone != null && phone.length() != 10) validateCall = false; if (firstname != null && firstname.length() < 2) validateCall = false; if (lastname != null && lastname.length() < 2) validateCall = false; if (facilityName != null && facilityName.length() < 2) validateCall = false; if (city != null && usstate == null) validateCall = false; return validateCall; } }
ProviderSearchLookupServiceImpl extends
		gov.samhsa.consent2share.service.provider.ProviderSearchLookupServiceImpl { @Override public boolean isValidatedSearch(String usstate, String city, String zipcode, String gender, String specialty, String phone, String firstname, String lastname, String facilityName) { boolean validateCall = true; if (usstate == null && city == null && zipcode == null && phone == null && specialty == null && firstname == null && lastname == null && facilityName == null && gender == null) validateCall = false; if (usstate != null && zipcode != null) validateCall = false; if (lastname == null && facilityName == null) { validateCall = false; } if (zipcode == null && city == null && usstate == null) { validateCall = false; } if (usstate != null) { if (usstate.matches("[a-zA-Z][a-zA-Z]") == true) { List<LookupDto> stateCodes = stateCodeService .findAllStateCodes(); boolean isValidStateCode = false; for (LookupDto stateCode : stateCodes) { if (usstate.compareToIgnoreCase(stateCode.getCode()) == 0) { isValidStateCode = true; break; } } if (isValidStateCode != true) { validateCall = false; } } else validateCall = false; } if (city != null && city.length() < 2) validateCall = false; if (zipcode != null && zipcode.length() < 5) validateCall = false; if (specialty != null && specialty.length() < 3) validateCall = false; if (phone != null && phone.length() != 10) validateCall = false; if (firstname != null && firstname.length() < 2) validateCall = false; if (lastname != null && lastname.length() < 2) validateCall = false; if (facilityName != null && facilityName.length() < 2) validateCall = false; if (city != null && usstate == null) validateCall = false; return validateCall; } ProviderSearchLookupServiceImpl(
			String providerSearchURL,
			StateCodeService stateCodeService,
			IndividualProviderService individualProviderService,
			OrganizationalProviderService organizationalProviderService,
			HashMapResultToProviderDtoConverter hashMapResultToProviderDtoConverter); }
ProviderSearchLookupServiceImpl extends
		gov.samhsa.consent2share.service.provider.ProviderSearchLookupServiceImpl { @Override public boolean isValidatedSearch(String usstate, String city, String zipcode, String gender, String specialty, String phone, String firstname, String lastname, String facilityName) { boolean validateCall = true; if (usstate == null && city == null && zipcode == null && phone == null && specialty == null && firstname == null && lastname == null && facilityName == null && gender == null) validateCall = false; if (usstate != null && zipcode != null) validateCall = false; if (lastname == null && facilityName == null) { validateCall = false; } if (zipcode == null && city == null && usstate == null) { validateCall = false; } if (usstate != null) { if (usstate.matches("[a-zA-Z][a-zA-Z]") == true) { List<LookupDto> stateCodes = stateCodeService .findAllStateCodes(); boolean isValidStateCode = false; for (LookupDto stateCode : stateCodes) { if (usstate.compareToIgnoreCase(stateCode.getCode()) == 0) { isValidStateCode = true; break; } } if (isValidStateCode != true) { validateCall = false; } } else validateCall = false; } if (city != null && city.length() < 2) validateCall = false; if (zipcode != null && zipcode.length() < 5) validateCall = false; if (specialty != null && specialty.length() < 3) validateCall = false; if (phone != null && phone.length() != 10) validateCall = false; if (firstname != null && firstname.length() < 2) validateCall = false; if (lastname != null && lastname.length() < 2) validateCall = false; if (facilityName != null && facilityName.length() < 2) validateCall = false; if (city != null && usstate == null) validateCall = false; return validateCall; } ProviderSearchLookupServiceImpl(
			String providerSearchURL,
			StateCodeService stateCodeService,
			IndividualProviderService individualProviderService,
			OrganizationalProviderService organizationalProviderService,
			HashMapResultToProviderDtoConverter hashMapResultToProviderDtoConverter); @Override boolean isValidatedSearch(String usstate, String city,
			String zipcode, String gender, String specialty, String phone,
			String firstname, String lastname, String facilityName); }
ProviderSearchLookupServiceImpl extends
		gov.samhsa.consent2share.service.provider.ProviderSearchLookupServiceImpl { @Override public boolean isValidatedSearch(String usstate, String city, String zipcode, String gender, String specialty, String phone, String firstname, String lastname, String facilityName) { boolean validateCall = true; if (usstate == null && city == null && zipcode == null && phone == null && specialty == null && firstname == null && lastname == null && facilityName == null && gender == null) validateCall = false; if (usstate != null && zipcode != null) validateCall = false; if (lastname == null && facilityName == null) { validateCall = false; } if (zipcode == null && city == null && usstate == null) { validateCall = false; } if (usstate != null) { if (usstate.matches("[a-zA-Z][a-zA-Z]") == true) { List<LookupDto> stateCodes = stateCodeService .findAllStateCodes(); boolean isValidStateCode = false; for (LookupDto stateCode : stateCodes) { if (usstate.compareToIgnoreCase(stateCode.getCode()) == 0) { isValidStateCode = true; break; } } if (isValidStateCode != true) { validateCall = false; } } else validateCall = false; } if (city != null && city.length() < 2) validateCall = false; if (zipcode != null && zipcode.length() < 5) validateCall = false; if (specialty != null && specialty.length() < 3) validateCall = false; if (phone != null && phone.length() != 10) validateCall = false; if (firstname != null && firstname.length() < 2) validateCall = false; if (lastname != null && lastname.length() < 2) validateCall = false; if (facilityName != null && facilityName.length() < 2) validateCall = false; if (city != null && usstate == null) validateCall = false; return validateCall; } ProviderSearchLookupServiceImpl(
			String providerSearchURL,
			StateCodeService stateCodeService,
			IndividualProviderService individualProviderService,
			OrganizationalProviderService organizationalProviderService,
			HashMapResultToProviderDtoConverter hashMapResultToProviderDtoConverter); @Override boolean isValidatedSearch(String usstate, String city,
			String zipcode, String gender, String specialty, String phone,
			String firstname, String lastname, String facilityName);  }