You need to sign in to do that
Don't have an account?
Rajesh-InLoveWithSFdc
Test Class for ChatterMessage Transaction Security
Can anybody please share the test class for below transaction Security Apex
global class DisableSSNChatterMSGPolicyCondition implements TxnSecurity.PolicyCondition {
public boolean evaluate(TxnSecurity.Event e) {
String str= e.data.get('Body');
Pattern p = Pattern.compile('(\\d{3}\\-\\d{2}-\\d{4})');
Matcher m = p.matcher(str);
if (m.find())
{
return true;
}
else
{
return false;
}
}
}
global class DisableSSNChatterMSGPolicyCondition implements TxnSecurity.PolicyCondition {
public boolean evaluate(TxnSecurity.Event e) {
String str= e.data.get('Body');
Pattern p = Pattern.compile('(\\d{3}\\-\\d{2}-\\d{4})');
Matcher m = p.matcher(str);
if (m.find())
{
return true;
}
else
{
return false;
}
}
}