1- using Microsoft . AspNetCore . Hosting ;
2- using Microsoft . Extensions . Configuration ;
1+ using Microsoft . Extensions . Configuration ;
32using Microsoft . Extensions . DependencyInjection ;
3+ using Microsoft . Extensions . Hosting ;
44using Microsoft . Extensions . Logging ;
55using Microsoft . Extensions . Options ;
66using Moq ;
77using Xunit ;
8+ using IHostingEnvironment = Microsoft . AspNetCore . Hosting . IHostingEnvironment ;
89
910namespace ICG . NetCore . Utilities . Email . SendGrid . Tests
1011{
@@ -46,8 +47,7 @@ public void ServiceCollection_ShouldRegisterSendGridService()
4647 var configuration = new ConfigurationBuilder ( )
4748 . AddJsonFile ( "appsettings.json" )
4849 . Build ( ) ;
49- collection . AddSingleton ( new Mock < Microsoft . Extensions . Hosting . IHostingEnvironment > ( ) . Object ) ;
50- collection . AddSingleton ( new Mock < IHostingEnvironment > ( ) . Object ) ;
50+ collection . AddSingleton ( new Mock < IHostEnvironment > ( ) . Object ) ;
5151 collection . UseIcgNetCoreUtilitiesEmailSendGrid ( configuration ) ;
5252 collection . AddLogging ( ) ;
5353 var services = collection . BuildServiceProvider ( ) ;
@@ -69,8 +69,7 @@ public void ServiceCollection_ShouldRegisterSendMessageBuilder()
6969 var configuration = new ConfigurationBuilder ( )
7070 . AddJsonFile ( "appsettings.json" )
7171 . Build ( ) ;
72- collection . AddSingleton ( new Mock < Microsoft . Extensions . Hosting . IHostingEnvironment > ( ) . Object ) ;
73- collection . AddSingleton ( new Mock < IHostingEnvironment > ( ) . Object ) ;
72+ collection . AddSingleton ( new Mock < IHostEnvironment > ( ) . Object ) ;
7473 collection . AddLogging ( ) ;
7574 collection . UseIcgNetCoreUtilitiesEmailSendGrid ( configuration ) ;
7675 var services = collection . BuildServiceProvider ( ) ;
@@ -91,8 +90,7 @@ public void ServiceCollection_ShouldRegisterSendGridSender()
9190 var configuration = new ConfigurationBuilder ( )
9291 . AddJsonFile ( "appsettings.json" )
9392 . Build ( ) ;
94- collection . AddSingleton ( new Mock < Microsoft . Extensions . Hosting . IHostingEnvironment > ( ) . Object ) ;
95- collection . AddSingleton ( new Mock < IHostingEnvironment > ( ) . Object ) ;
93+ collection . AddSingleton ( new Mock < IHostEnvironment > ( ) . Object ) ;
9694 collection . UseIcgNetCoreUtilitiesEmailSendGrid ( configuration ) ;
9795 var services = collection . BuildServiceProvider ( ) ;
9896
0 commit comments