You need to sign in to do that
Don't have an account?
Mrityunjay Patel 18
Map<String, Set<String>> shopFldToValMap = new Map<String, Set<String>>();
Map<Integer, String> indexToShopFld = new Map<Integer, String>();
shopFldToValMap.get(indexToShopFld.get(i)).size() != 0) {
String condtn ;
if(indexToCondn.get(i) == 'equals') {
for(String s : shopFldToValMap.get(indexToShopFld.get(i))) {
if(s != null && s.length() != 0) {
if(condtn != null) {
condtn += ' or ';
condtn += '('+indexToSfFld.get(i);
} else {
condtn = '('+indexToSfFld.get(i);
}
if(s != null) {
s = String.escapeSingleQuotes(s);
}
s = '\''+s+'\'';
condtn += ' = '+s+')' ;
}
Thanks in advance
how to write the test method for this type of code ?
Map<String, Set<String>> shopFldToValMap = new Map<String, Set<String>>();
Map<Integer, String> indexToShopFld = new Map<Integer, String>();
shopFldToValMap.get(indexToShopFld.get(i)).size() != 0) {
String condtn ;
if(indexToCondn.get(i) == 'equals') {
for(String s : shopFldToValMap.get(indexToShopFld.get(i))) {
if(s != null && s.length() != 0) {
if(condtn != null) {
condtn += ' or ';
condtn += '('+indexToSfFld.get(i);
} else {
condtn = '('+indexToSfFld.get(i);
}
if(s != null) {
s = String.escapeSingleQuotes(s);
}
s = '\''+s+'\'';
condtn += ' = '+s+')' ;
}
Thanks in advance
The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.