Skip to content

Commit fd3a65c

Browse files
author
elbuo8
committed
Added AddToName Test and Support for BCC test
1 parent 8dd3f8e commit fd3a65c

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/test/java/com/sendgrid/SendGridTest.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,32 @@ public class SendGridTest {
5858

5959
}
6060

61+
@Test public void testDropSmtpTo() {
62+
email = new SendGrid.Email();
63+
64+
String to = "email@example.com";
65+
email.addTo(to);
66+
email.dropSMTPITos();
67+
68+
Map correct = new HashMap();
69+
correct.put("to[0]", "email@example.com");
70+
71+
assertEquals(correct, email.toWebFormat());
72+
73+
}
74+
75+
@Test public void testAddToName() {
76+
email = new SendGrid.Email();
77+
78+
String name = "John";
79+
email.addToName(name);
80+
81+
Map correct = new HashMap();
82+
correct.put("toname[0]", name);
83+
84+
assertEquals(correct, email.toWebFormat());
85+
}
86+
6187
@Test public void testSetFrom() {
6288
email = new SendGrid.Email();
6389

0 commit comments

Comments
 (0)