mirror of
https://github.com/google/nomulus.git
synced 2025-05-29 08:50:09 +02:00
Make BillingModule.OVERALL_INVOICE_PREFIX configurable
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=221700223
This commit is contained in:
parent
45f63cbecf
commit
36c6265980
8 changed files with 31 additions and 11 deletions
|
@ -67,7 +67,7 @@ public class BillingEmailUtilsTest {
|
|||
when(emailService.createMessage())
|
||||
.thenReturn(new MimeMessage(Session.getDefaultInstance(new Properties(), null)));
|
||||
gcsUtils = mock(GcsUtils.class);
|
||||
when(gcsUtils.openInputStream(new GcsFilename("test-bucket", "results/CRR-INV-2017-10.csv")))
|
||||
when(gcsUtils.openInputStream(new GcsFilename("test-bucket", "results/REG-INV-2017-10.csv")))
|
||||
.thenReturn(
|
||||
new ByteArrayInputStream("test,data\nhello,world".getBytes(StandardCharsets.UTF_8)));
|
||||
msgCaptor = ArgumentCaptor.forClass(Message.class);
|
||||
|
@ -80,6 +80,7 @@ public class BillingEmailUtilsTest {
|
|||
"my-receiver@test.com",
|
||||
ImmutableList.of("hello@world.com", "hola@mundo.com"),
|
||||
"test-bucket",
|
||||
"REG-INV",
|
||||
"results/",
|
||||
gcsUtils,
|
||||
new Retrier(new FakeSleeper(new FakeClock()), RETRY_COUNT));
|
||||
|
@ -109,7 +110,7 @@ public class BillingEmailUtilsTest {
|
|||
.isEqualTo("Attached is the 2017-10 invoice for the domain registry.");
|
||||
assertThat(contents.getBodyPart(1)).isInstanceOf(BodyPart.class);
|
||||
BodyPart attachmentPart = contents.getBodyPart(1);
|
||||
assertThat(attachmentPart.getContentType()).endsWith("name=CRR-INV-2017-10.csv");
|
||||
assertThat(attachmentPart.getContentType()).endsWith("name=REG-INV-2017-10.csv");
|
||||
assertThat(attachmentPart.getContent().toString()).isEqualTo("test,data\nhello,world");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue