1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package mocks; |
17 |
|
|
18 |
|
import javax.mail.Address; |
19 |
|
import javax.mail.MessagingException; |
20 |
|
import javax.mail.internet.AddressException; |
21 |
|
|
22 |
|
import org.kuali.rice.core.mail.Mailer; |
23 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 4 |
Complexity Density: 0.57 |
|
24 |
|
public class MockMailer extends Mailer{ |
25 |
|
|
26 |
|
|
27 |
|
@see |
28 |
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
29 |
0
|
@Override... |
30 |
|
public void sendMessage(String sender, Address[] recipients, |
31 |
|
String subject, String messageBody, Address[] ccRecipients, |
32 |
|
Address[] bccRecipients, boolean htmlMessage) |
33 |
|
throws AddressException, MessagingException { |
34 |
|
|
35 |
0
|
String toValue = ""; |
36 |
0
|
for(Address a: recipients){ |
37 |
0
|
toValue += a.toString(); |
38 |
|
} |
39 |
|
|
40 |
0
|
String fromValue = (sender == null) ? "" : sender; |
41 |
0
|
String subjectValue = (subject == null) ? "" : subject; |
42 |
0
|
String bodyValue = (messageBody == null) ? "" : messageBody; |
43 |
0
|
LOG.info("\nWILL NOT send e-mail message with to '" + toValue + "'... \nfrom '" + fromValue + "'... \nsubject '" + subjectValue + "'... and \nbody '" + bodyValue); |
44 |
|
} |
45 |
|
} |