TestAccount: rename getEmailAddress() to getNameEmail()
The getEmailAddress() returns "name <login@host>" while an email address is often interpreted as "login@host" Change-Id: Icf4d825d1618dea547f546d83af724bfe210da9d
This commit is contained in:
@@ -1282,7 +1282,7 @@ public abstract class AbstractDaemonTest {
|
||||
}
|
||||
|
||||
protected void assertNotifyCc(TestAccount expected) {
|
||||
assertNotifyCc(expected.getEmailAddress());
|
||||
assertNotifyCc(expected.getNameEmail());
|
||||
}
|
||||
|
||||
protected void assertNotifyCc(String expectedEmail, String expectedFullname) {
|
||||
@@ -1302,7 +1302,7 @@ public abstract class AbstractDaemonTest {
|
||||
protected void assertNotifyBcc(TestAccount expected) {
|
||||
assertThat(sender.getMessages()).hasSize(1);
|
||||
Message m = sender.getMessages().get(0);
|
||||
assertThat(m.rcpt()).containsExactly(expected.getEmailAddress());
|
||||
assertThat(m.rcpt()).containsExactly(expected.getNameEmail());
|
||||
assertThat(m.headers().get("To").isEmpty()).isTrue();
|
||||
assertThat(m.headers().get("Cc").isEmpty()).isTrue();
|
||||
}
|
||||
|
@@ -79,7 +79,7 @@ public abstract class TestAccount {
|
||||
.toString();
|
||||
}
|
||||
|
||||
public Address getEmailAddress() {
|
||||
public Address getNameEmail() {
|
||||
// Address is weird enough that it's safer and clearer to create a new instance in a
|
||||
// non-abstract method rather than, say, having an abstract emailAddress() as part of this
|
||||
// AutoValue class. Specifically:
|
||||
|
Reference in New Issue
Block a user