Ejemplo n.º 1
0
        public HistoryMailFixture()
        {
            var loggerFactory = new LoggerFactory();

            loggerFactory.AddDebug(LogLevel.Debug);

            var sendGridSettings = new SendGridMailerSettings
            {
                ApiKey           = "abc",
                FromDisplayName  = "xunit",
                FromEmailAddress = "*****@*****.**"
            };

            var logger = loggerFactory.CreateLogger <SendGridMailer>();

            MailerFactoryForHistoryWithSerializableAttachments.Register(() => new SendGridMailerFake(
                                                                            new OptionsWrapper <SendGridMailerSettings>(sendGridSettings),
                                                                            logger,
                                                                            StoreWithSerializableAttachments));

            MailerFactoryForHistoryWithoutSerializableAttachments.Register(() => new SendGridMailerFake(
                                                                               new OptionsWrapper <SendGridMailerSettings>(sendGridSettings),
                                                                               logger,
                                                                               StoreWithoutSerializableAttachments));
        }