Add (failing) tests to DisplayRecipientsExtractorTest
This commit is contained in:
parent
9bcd64f54e
commit
424a37eaeb
1 changed files with 39 additions and 0 deletions
|
@ -48,6 +48,45 @@ class DisplayRecipientsExtractorTest {
|
|||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `single recipient is identity address with different local part case`() {
|
||||
val message = buildMessage {
|
||||
header("To", "Test User <ME@domain.example>")
|
||||
}
|
||||
|
||||
val displayRecipients = displayRecipientsExtractor.extractDisplayRecipients(message, account)
|
||||
|
||||
assertThat(displayRecipients).isEqualTo(
|
||||
DisplayRecipients(recipientNames = listOf("me"), numberOfRecipients = 1),
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `single recipient is identity address with different domain case`() {
|
||||
val message = buildMessage {
|
||||
header("To", "Test User <me@DOMAIN.EXAMPLE>")
|
||||
}
|
||||
|
||||
val displayRecipients = displayRecipientsExtractor.extractDisplayRecipients(message, account)
|
||||
|
||||
assertThat(displayRecipients).isEqualTo(
|
||||
DisplayRecipients(recipientNames = listOf("me"), numberOfRecipients = 1),
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `single recipient is identity address with different local part and domain case`() {
|
||||
val message = buildMessage {
|
||||
header("To", "Test User <ME@DOMAIN.EXAMPLE>")
|
||||
}
|
||||
|
||||
val displayRecipients = displayRecipientsExtractor.extractDisplayRecipients(message, account)
|
||||
|
||||
assertThat(displayRecipients).isEqualTo(
|
||||
DisplayRecipients(recipientNames = listOf("me"), numberOfRecipients = 1),
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `single recipient is a contact`() {
|
||||
val message = buildMessage {
|
||||
|
|
Loading…
Reference in a new issue