Change SendEmailService to an instance field.

This allows us to inject it with Dagger and avoid using InjectRule to set it
in unit tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217571475
This commit is contained in:
jianglai 2018-10-17 12:55:22 -07:00
parent 06ce429c5a
commit 84c3544097
5 changed files with 14 additions and 20 deletions

View file

@ -25,7 +25,6 @@ import dagger.Provides;
import google.registry.bigquery.BigqueryConnection;
import google.registry.request.HttpException.BadRequestException;
import google.registry.request.Parameter;
import google.registry.util.SendEmailService;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.util.Optional;
@ -115,11 +114,6 @@ public final class IcannReportingModule {
}
}
@Provides
static SendEmailService provideSendEmailService() {
return new SendEmailService();
}
/** Dagger qualifier for the subdirectory we stage to/upload from. */
@Qualifier
@Documented